PKG_CLEANUP_DIR(1)

NAME
PKG_CLEANUP_DIR - removes files not referenced by pkg_summary

SYNOPSIS
pkg_cleanup_dir [OPTIONS] [files ...]

DESCRIPTION
pkg_cleanup_dir analyses FIELD in pkg_summary given on input and optionally removes files and directories under DIR, not referenced by any package. FIELD may be FILE_NAME, for example. Also, FILES are not removed.

OPTIONS

-h  Display help message.

-d DIR
    Directory to clean up (mandatory option).

-D  Do not remove empty sudirectories after removing files.

-f FIELD
    Field name (mandatory option).

-I  Ignore subdirectry of files under DIR while comparing.

-r  Remove unreferenced files and empty subdirectories. By default list of files to be removed is output to stdout.

-s  DIR is set as dirname of pkg_summary file. dirname is called as many times as option -s is specified.

-x FILES
    Do not remove the specified files.

ENVIRONMENT

TMPDIR
    Directory for temporary files, by default /tmp is used.

EXAMPLES
# pkg_cleanup_dir -f FILE_NAME -d /usr/pkgsrc/packages -r bin_summary.txt # pkg_cleanup_dir -f ALLSRCFILES -d /usr/pkgsrc/distfiles -r src_summary.txt

SEE ALSO
pkg_summary-utils(7), pkg_summary(5)

AUTHOR
Aleksey Cheusov <vle@gmx.net>