CRYPTSETUP-CLOSE(8)

πŸ’– CRYPTSETUP-CLOSE πŸ’–

okay bestie, so this is cryptsetup-close β€” it lives in the Maintenance Commands part of the cryptsetup manual, section 8. And no cap, it does exactly one iconic thing: it closes stuff. Let's get into it 🫢


✨ NAME ✨

cryptsetup-close β€” removes the existing mapping <name> (and the associated key). bye girl πŸ’…


🌸 SYNOPSIS 🌸

cryptsetup close [<options>] <name>

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically: it removes the existing mapping <name> and wipes the key from kernel memory. That's the whole vibe. Gone. Deleted. Not me crying over a wiped key 😭

For backward compatibility, there are a bunch of close command aliases, and they're all giving the same energy: remove, plainClose, luksClose, loopaesClose, tcryptClose, bitlkClose. They all behave the same, because the device type is determined automatically from the active device. iykyk ✨

<options> can be [--deferred, --cancel-deferred, --header, --disable-locks].


πŸ‘‘ OPTIONS πŸ‘‘

  • --batch-mode, -q β€” Suppresses all confirmation questions. Use with care, bestie, fr fr! 🚨 And also: if the --verify-passphrase option is not specified, this option also switches off the passphrase verification.
  • --cancel-deferred β€” Removes a previously configured deferred device removal in the close command. Undoing the undoing, we love to see it πŸŽ€
  • --debug or --debug-json β€” Run in debug mode with full diagnostic logs. Debug output lines are always prefixed by #. And if you use --debug-json, additional LUKS2 JSON data structures are printed. nerdy and gorgeous πŸ’œ
  • --deferred β€” Defers device removal in the close command until the last user closes it. It's giving "we'll leave when everyone's ready" 🌸
  • --disable-locks β€” Disable lock protection for metadata on disk. This option is valid only for LUKS2 and is ignored for other formats.
WARNING: Do not use this option unless you run cryptsetup in a restricted environment where locking is impossible to perform (where /run directory cannot be used). Like, seriously. Do not. πŸ™ˆ
  • --header <device or file storing the LUKS header> β€” Use a detached (separated) metadata device or file where the LUKS header is stored. This option allows one to store the ciphertext and LUKS header on different devices. Separate but together, the main character couple energy πŸ’–

For commands that change the LUKS header (e.g., luksAddKey), specify the device or file with the LUKS header directly as the LUKS device.

  • --help, -? β€” Show help text and default parameters. ✨
  • --usage β€” Show short option help.
  • --version, -V β€” Show the program version.

πŸ“ REPORTING BUGS πŸ“

Report bugs at cryptsetup mailing list <cryptsetup@lists.linux.dev> or in Issues project section <https://gitlab.com/cryptsetup/cryptsetup/-/issues/new>. slay, they're actually listening 🫢

Please attach the output of the failed command with --debug option added. That's the receipt, bestie, they need it πŸ“


🌈 SEE ALSO 🌈

Cryptsetup FAQ <https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions>

cryptsetup(8), integritysetup(8) and veritysetup(8) β€” the whole friend group πŸ’œ


⭐ CRYPTSETUP ⭐

Part of cryptsetup project <https://gitlab.com/cryptsetup/cryptsetup/>. iconic behavior, honestly πŸ‘‘


and that's the whole page, bestie!! this one's cryptsetup 2.8.8, dated 2026-09-07, and it's part of the cryptsetup project at <https://gitlab.com/cryptsetup/cryptsetup/>. go close that mapping, you absolute legend πŸ¦‹πŸ’– periodt.

πŸ“¦ where this page comes from