Target Maintenance - Stow
Description: Stow

Next: Resource Files, Previous: Multiple Stow Directories, Up: Top

## 10 Target Maintenance

From time to time you will need to clean up your target tree. Since version 2, Stow provides a new utility `chkstow` to help with this. It includes three operational modes which performs checks that would generally be too expensive to be performed during normal stow execution.

The syntax of the `chkstow` command is:

         chkstow [options]

The following options are supported:

‘`-t dir`’
‘`--target=dir`’
  Set the target directory to dir instead of the parent of the stow directory. Defaults to the parent of the stow directory, so it is typical to execute `stow` from the directory `/usr/local/stow`.
‘`-b`’
‘`--badlinks`’
  Checks target directory for bogus symbolic links. That is, links that point to non-existent files.
‘`-a`’
‘`--aliens`’
  Checks for files in the target directory that are not symbolic links. The target directory should be managed by stow alone, except for directories that contain a `.stow` file.
‘`-l`’
‘`--list`’
  Will display the target package for every symbolic link in the stow target directory.