PKG_CLEANUP_PACKAGES(1)

NAME
PKG_CLEANUP_PACKAGES - cleanups PACKAGES directory

SYNOPSIS
pkg_cleanup_packages [OPTIONS] [files ...]

DESCRIPTION
pkg_cleanup_packages analyses FILE_NAME field of pkg_summary(5) given on input and outputs list of files found in PACKAGES that are not referenced by any package. With option -r it removes all those files.

OPTIONS

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

-h  Display help message.

-d DIR
    Directory to clean up. It overrides environment variable PACKAGES.

-r  Remove unreferenced files. File specified in PSU_KEEP_FILES environment variable are not removed.

ENVIRONMENT

PACKAGES
    Directory that contains distfiles. The default is /usr/pkgsrc/packages.

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

PSU_KEEP_FILES
    Files from this list are not removed. The default is: pkg_summary.txt, pkg_summary.gz, pkg_summary.bz2, SHA512.txt, SHA512.gz and SHA512.bz2.

EXAMPLES
# export PACKAGES=/usr/pkgsrc/packages # pkg_cleanup_packages -r /usr/pkgsrc/packages/All/pkg_summary.txt # pkg_cleanup_packages -r -ss /usr/pkgsrc/packages/All/pkg_summary.txt

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

AUTHOR
Aleksey Cheusov <vle@gmx.net>