---
name: "rcdn"
section: "1"
platform: "linux"
package: "rcm"
version: "1.3.4-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rcdn"
---

# rcdn(1)

remove dotfiles as managed by rcm

## NAME

**rcdn** – remove dotfiles as managed by rcm

## 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

This program will remove all the rc files that the [rcm(7)](/rcm/7.md) suite knows about. This can be further controlled with the **-t** and **-d** flags.

The files that are removed are symlinks. However, the *COPY\_ALWAYS* setting in [rcrc(5)](/rcrc/5.md) modifies this. If a rc file is not a symlink but an ancestor directory is, that directory is removed. If a rc file is not a symlink but is listed in *COPY\_ALWAYS* the file is 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* and *hooks/post-down*. These hooks are run each time **rcdn** is run and therefore must be idempotent.

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*.

- **-B** *HOSTNAME*

  treat *host-HOSTNAME* as the host-specific directory instead of computing it

- **-d** *DIR*

  remove rc files from the *DIR*. This can be specified multiple times.

- **-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)](/rcrc/5.md). This can be repeated with additional patterns. See [lsrc(1)](/lsrc/1.md), EXCLUDE PATTERN, for more details.

- **-K**

  skip pre- and post-hooks

- **-k**

  run pre- and post-hooks. This is the default.

- **-q**

  decrease verbosity

- **-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)](/lsrc/1.md) 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)](/lsrc/1.md) for more information.

- **-v**

  increase verbosity. This can be repeated for extra verbosity.

- **-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)](/lsrc/1.md), EXCLUDE PATTERN, for more details.

- *files*

  only remove the specified file(s)

## ENVIRONMENT

- RCRC

  User configuration file. Defaults to *~/.rcrc*.

## FILES

*~/.rcrc*

## EXAMPLES

```
rcdn -v
```

```
rcdn zshrc
```

```
rcdn -t python
```

```
rcdn -d ~/corporate-dotfiles
```

```
rcdn -x '*:.zshrc'
```

## SEE ALSO

[lsrc(1)](/lsrc/1.md), [mkrc(1)](/mkrc/1.md), [rcup(1)](/rcup/1.md), [rcrc(5)](/rcrc/5.md), [rcm(7)](/rcm/7.md)

## AUTHORS

**rcdn** is maintained by Mike Burns ⟨*mburns@thoughtbot.com*⟩ and *thoughtbot:* **http://thoughtbot.se**
