CLEANARCH(1)
๐ CLEANARCH(1) โ like, the manual page, bestie โจ
okay so real quick: this is cleanarch, a User Contributed Perl Documentation page, and it's genuinely the glow-up your DNSSEC-Tools key archive has been waiting for. we're cleaning out old keys. it's giving spring cleaning but for cryptography. ๐งน๐
โจ NAME โจ
cleanarch โ Clean a DNSSEC-Tools key archive of old keys. that's it. that's the job. ๐
๐ SYNOPSIS ๐
cleanarch [options] <keyrec-file | rollrec-file>
one file arg, lots of options. we love a flexible queen. ๐ฆ
๐ธ DESCRIPTION ๐ธ
cleanarch deletes old keys from a DNSSEC-Tools key archive. how does it decide what counts as "old"? the vibe check comes from your options and arguments โ key "age" and archives are determined by those. โจ
the command line options and arguments let you pick which archives, which keys to delete, and how much output to provide. the options are divided into three groups: archive selection, key selection, and output format. the full tea on all of them lives in the OPTIONS section, and yes, we get into every single one. ๐ซถ
cleanarch takes a single argument (as distinguished from an option, bestie, do not come for me). that argument may be either a keyrec file or a rollrec file:
- if the file is a keyrec file, the archive directory for its zone keyrecs gets added to the list of archives to clean. ๐
- if the file is a rollrec file, keyrec files for its zones are searched for the zones' archive directory, and those directories get added to the list of archives to clean. ๐
- if a zone does not have an archive directory explicitly defined, then the DNSSEC-Tools default will be cleaned. defaults, always coming in clutch.
the archives specified by this argument may be modified by archive-selection options. like, the arg shows up, but the options can still rearrange the seating chart.
the archive-selection options combine with the keyrec or rollrec file to select a set of archive directories to clean. (some options can take the place of the file argument entirely โ main character energy, honestly.) ๐
the key-selection options let the set of keys to be deleted contain an entire archive, a particular zone's keys, or all the keys prior to a certain date. so many ways to say goodbye. ๐ญ
the output-format options set how much output you'll be given:
- with no options selected, the names of keys will be printed as they are deleted.
- with
-verbose, the directories selected for searching and the keys selected for deletion will be printed. - with
-dirlist, the directories selected for searching will be printed, and no other action will be taken. - with
-list, the keys selected for deletion will be printed, and no other action will be taken.
โ ๏ธ important, no cap:cleanarchonly cleans the archive directories. the keyrec files are left intact. thecleankrfcommand should be used in conjunction withcleanarchin order to have a consistent environment. team work makes the dream work. ๐ค
๐ OPTIONS ๐
๐๏ธ Archive-Selection Options
these let you pick which archives get cleaned. choose your fighters. โจ
-archive directoryโ specifies an archive directory to be cleaned. that's the one, bestie, that's the target. ๐ฏ-defarchโ says "hey, clean the default archive directory" โ the one named in the DNSSEC-Tools configuration file. the ol' reliable. ๐-zone zoneโ sayszoneis the only zone whose archive will be cleaned. heads up though: if the archive directory is shared by other zones, then their keys may also be deleted. shared custody, shared consequences. ๐
๐ Key-Selection Options
these let you pick which keys are getting deleted. be strong. ๐ญ
-allโ deletes all keys in the selected archives. everything. the whole closet. ๐ฅ this option may not be used with any other key-selection options โ like, it doesn't share the spotlight, periodt.-days daysโ deletes all keys except those whose modification date is within thedaysfull days preceding the current day. so recent keys stay, old ones go. math is math. ๐งฎ-onezone zoneโ only keys withzonein the key's filename are deleted. intended for use in cleaning a multi-zone key archive. multitasking icon. ๐
๐ซถ real talk: this does not validate thatzoneis an actual zone. any string can be used here. for example, using"private"will select old private key files for deletion, and using"com"will select any filename that contains"com". it's a vibes-based filter, not a strict one. handle with care.
๐ข Options for Output Control
because sometimes you want the play-by-play and sometimes you want silence. both are valid. ๐
-dirlistโ lists the selected archive directories. no other action is taken. just a lil look, no touching. ๐-listโ lists the selected keys. no other action is taken. again: looking only.-quietโ display no output. shhh. ๐คซ-verboseโ display verbose output. tell me everything. ๐ฃ๏ธ-Versionโ displays the version information forcleanarchand the DNSSEC-Tools package. (note the capital V, bestie โ it's-Version, not-version.) โญ-helpโ display a usage message and exit. the classic escape hatch. ๐ช
๐จ WARNINGS ๐จ
the user is advised to invest a bit of time testing this tool prior to putting it into production use. please please please test it first. ๐
once a key is deleted, it is gone. like, gone gone. no undo button, no drafts folder, nothing. ๐
some may find this to be detrimental to the health of their DNSSEC-Tools installation. which is a very polite way of saying "you might genuinely wreck your setup, so maybe don't yolo it." ๐ญ
๐ COPYRIGHT ๐
Copyright 2007-2014 SPARTA, Inc. All rights reserved. see the COPYING file included with the DNSSEC-Tools package for details. legal girlies, this one's for you. ๐
๐ AUTHOR ๐
Wayne Morrison, tewok@tislabs.com. thank you wayne, icon behaviour. ๐ซถ
๐ SEE ALSO ๐
cleankrf(8),lskrf(8),zonesigner(8)Net::DNS::SEC::Tools::keyrec.pm(3),Net::DNS::SEC::Tools::rollrec.pm(3)dnssec-tools.conf(5),keyrec.pm(5),rollrec.pm(5)
go read them, iykyk. ๐โจ
and that's the whole page, bestie! ๐ this one shipped as perl v5.44.0 and got its timestamp on 2026-10-17 โ so like, screenshot it, cite it, love it. mwah. ๐
๐๐ฆ
๐ฆ where this page comes from
- arch rolling: dnssec-tools 2.2.3-16 ยท BSD
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms