1CRYPTSETUP-LUKSREMOVEKEY(8) Maintenance Commands CRYPTSETUP-LUKSREMOVEKEY(8)
2
3
4
6 cryptsetup-luksRemoveKey - remove the supplied passphrase from the LUKS
7 device
8
10 cryptsetup luksRemoveKey [<options>] <device> [<key file with
11 passphrase to be removed>]
12
14 Removes the supplied passphrase from the LUKS device. The passphrase to
15 be removed can be specified interactively, as the positional argument
16 or via --key-file.
17
18 <options> can be [--key-file, --keyfile-offset, --keyfile-size,
19 --header, --disable-locks, --type, --timeout, --verify-passphrase].
20
21 WARNING: If you read the passphrase from stdin (without further
22 argument or with '-' as an argument to --key-file), batch-mode (-q)
23 will be implicitly switched on and no warning will be given when you
24 remove the last remaining passphrase from a LUKS container. Removing
25 the last passphrase makes the LUKS container permanently inaccessible.
26
28 --type <device-type>
29 Specifies required device type, for more info read BASIC ACTIONS
30 section in cryptsetup(8).
31
32 --verify-passphrase, -y
33 When interactively asking for a passphrase, ask for it twice and
34 complain if both inputs do not match. Ignored on input from file or
35 stdin.
36
37 --key-file, -d name
38 Read the passphrase from file.
39
40 If the name given is "-", then the passphrase will be read from
41 stdin. In this case, reading will not stop at newline characters.
42
43 See section NOTES ON PASSPHRASE PROCESSING in cryptsetup(8) for
44 more information.
45
46 --keyfile-offset value
47 Skip value bytes at the beginning of the key file.
48
49 --keyfile-size, -l value
50 Read a maximum of value bytes from the key file. The default is to
51 read the whole file up to the compiled-in maximum that can be
52 queried with --help. Supplying more data than the compiled-in
53 maximum aborts the operation.
54
55 This option is useful to cut trailing newlines, for example. If
56 --keyfile-offset is also given, the size count starts after the
57 offset.
58
59 --timeout, -t <number of seconds>
60 The number of seconds to wait before timeout on passphrase input
61 via terminal. It is relevant every time a passphrase is asked. It
62 has no effect if used in conjunction with --key-file.
63
64 This option is useful when the system should not stall if the user
65 does not input a passphrase, e.g. during boot. The default is a
66 value of 0 seconds, which means to wait forever.
67
68 --header <device or file storing the LUKS header>
69 Use a detached (separated) metadata device or file where the LUKS
70 header is stored. This option allows one to store ciphertext and
71 LUKS header on different devices.
72
73 For commands that change the LUKS header (e.g. luksAddKey), specify
74 the device or file with the LUKS header directly as the LUKS
75 device.
76
77 --disable-locks
78 Disable lock protection for metadata on disk. This option is valid
79 only for LUKS2 and ignored for other formats.
80
81 WARNING: Do not use this option unless you run cryptsetup in a
82 restricted environment where locking is impossible to perform
83 (where /run directory cannot be used).
84
85 --batch-mode, -q
86 Suppresses all confirmation questions. Use with care!
87
88 If the --verify-passphrase option is not specified, this option
89 also switches off the passphrase verification.
90
91 --debug or --debug-json
92 Run in debug mode with full diagnostic logs. Debug output lines are
93 always prefixed by #.
94
95 If --debug-json is used, additional LUKS2 JSON data structures are
96 printed.
97
98 --version, -V
99 Show the program version.
100
101 --usage
102 Show short option help.
103
104 --help, -?
105 Show help text and default parameters.
106
108 Report bugs at cryptsetup mailing list <cryptsetup@lists.linux.dev> or
109 in Issues project section
110 <https://gitlab.com/cryptsetup/cryptsetup/-/issues/new>.
111
112 Please attach output of the failed command with --debug option added.
113
115 Cryptsetup FAQ
116 <https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions>
117
118 cryptsetup(8), integritysetup(8) and veritysetup(8)
119
121 Part of cryptsetup project <https://gitlab.com/cryptsetup/cryptsetup/>.
122
123
124
125cryptsetup 2.6.1 2023-02-10 CRYPTSETUP-LUKSREMOVEKEY(8)