RCDN(1)

๐Ÿ“ฆ
version 1.3.6 ยท 2 versions
, in alpine 3.24, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu stonking

๐Ÿ’– RCDN(1) โ€” the rcdn page, bestie edition ๐Ÿ’–

General Commands Manual ยท the one where we YEET the dotfiles


โœจ NAME โœจ

rcdn โ€” remove dotfiles as managed by rcm

okay so. you know how rcup puts all your cute little dotfiles in place? rcdn is the undo button. it removes them. it's giving reverse card. ๐Ÿƒ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

rcdn [-hKkqVv] [-B hostname] [-d dir] [-I excl_pat] [-S excl_pat]
     [-s excl_pat] [-t tag] [-U excl_pat] [-u excl_pat] [-x excl_pat]
     [files ...]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So. This program will remove all the rc files that the rcm(7) suite knows about. All of them. Every single one it's aware of. You can narrow that down with the -t and -d flags if you're not in a full-send mood. ๐Ÿ’…

The files that get removed are symlinks. However, the COPY_ALWAYS setting in rcrc(5) modifies this. So:

  • If a rc file is not a symlink but an ancestor directory is โ€” that directory is the one that gets removed.
  • If a rc file is not a symlink but is listed in COPY_ALWAYS โ€” the file itself gets removed.

The rcdn program will run hooks before and after removing files, if these hooks exist. Hooks are executable programs inside the dotfiles directory, with the following names:

  • hooks/pre-down
  • hooks/post-down
These hooks are run each time rcdn is run and therefore must be idempotent. no cap. if your hook isn't idempotent it's gonna have a bad time. ๐Ÿ˜ญ

Hooks will be executed one at a time, sorted alphabetically. For instance, hooks/pre-down/animals will run before hooks/pre-down/aquariums, and hooks/pre-down/4-eyes will run before hooks/post-down/2-u-nothing-compares.


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -B HOSTNAME โ€” treat host-HOSTNAME as the host-specific directory instead of computing it. you don't gotta do the math, we did it for you. ๐Ÿงฎ
  • -d DIR โ€” remove rc files from the DIR. This can be specified multiple times. (stack 'em up, queen ๐Ÿ‘‘)
  • -h โ€” show usage instructions.
  • -I EXCL_PAT โ€” remove rc files that match EXCL_PAT despite being excluded by the -x flag or a setting in rcrc(5). This can be repeated with additional patterns. See lsrc(1), โ€œEXCLUDE PATTERNโ€, for more details. (this is the override one. the "actually, no" one. ๐Ÿ’€)
  • -K โ€” skip pre- and post-hooks. no hooks today, we're booked. ๐Ÿ™ˆ
  • -k โ€” run pre- and post-hooks. This is the default.
  • -q โ€” decrease verbosity. shhh. ๐Ÿคซ
  • -S EXCL_PAT โ€” when removing dotfiles, any file that matches EXCL_PAT should be treated as a file that was symlinked, even if it is a directory. This can be repeated.
  • -s EXCL_PAT โ€” when removing dotfiles, any directory that matches EXCL_PAT should be recurred upon like normal. This is the default, and is the opposite of -S. This can be repeated.
  • -t TAG โ€” remove dotfiles according to TAG. ๐Ÿท๏ธ
  • -U EXCL_PAT โ€” any rc file or directory that matches EXCL_PAT is considered to have been installed without a leading dot when removing them. Must be specified for rc files or directories that were indeed installed without a leading dot. This can be repeated. See the documentation of the -U option in lsrc(1) for more information.
  • -u EXCL_PAT โ€” any rc file or directory that matches EXCL_PAT is considered to have been installed with a leading dot when removing them. This is the default, and is the opposite of -U. This can be repeated. See the documentation of the -u option in lsrc(1) for more information.
  • -v โ€” increase verbosity. This can be repeated for extra verbosity. (spam that -v, bestie, go -vvvv if you're feeling unhinged โœจ)
  • -V โ€” show the version number.
  • -x EXCL_PAT โ€” do not remove rc files that match EXCL_PAT. This can be repeated with additional patterns. See lsrc(1), โ€œEXCLUDE PATTERNโ€, for more details. (the leave it alone flag ๐Ÿ›‘)
  • files โ€” only remove the specified file(s)

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

  • RCRC โ€” User configuration file. Defaults to ~/.rcrc.

๐ŸŽ€ FILES ๐ŸŽ€

  • ~/.rcrc

โญ EXAMPLES โญ

like. here's the vibe. run these:

rcdn -v
rcdn zshrc
rcdn -t python
rcdn -d ~/corporate-dotfiles
rcdn -x '*:.zshrc'

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

lsrc(1), mkrc(1), rcup(1), rcrc(5), rcm(7)

(go read rcup(1) if you wanna do the opposite of this. balance. ๐Ÿงš)


๐Ÿซถ AUTHORS ๐Ÿซถ

rcdn is maintained by Mike Burns <mburns@thoughtbot.com> and thoughtbot: http://thoughtbot.com


Debian ยท August 2, 2013

and that's the whole page, bestie. ๐Ÿ’– shipped from Debian, dated August 2, 2013, and it ate. go forth and rcdn responsibly. periodt. โœจ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from