portsclean
—
a tool to clean ports/packages garbage
portsclean |
[-hCDDiLnPPQQq ] |
portsclean
is a tool to help users clean out the working
directories of their ports tree, no longer referenced distfiles, outdated
package files, and obsolete or orphaned shared libraries that were possibly
left by
pkg_deinstall(1)
's -P
option.
The following command line arguments are supported:
-h
-
--help
- Show help and exit.
-C
-
--workclean
- Clean out all the working directories of the ports tree. (cf.
WRKDIRPREFIX
)
-D
-
--distclean
- Clean out all the distfiles that are not referenced by any port in the
ports tree. Specified twice (i.e.
-DD
), clean out
all the distfiles that are not referenced by any port that is currently
installed. (cf. DISTDIR
)
-i
-
--interactive
- Turn on interactive mode. The user is asked for approval before each
suggested file/directory is removed.
-L
-
--libclean
- Clean out old, duplicate and/or orphaned shared libraries.
portsclean
first deletes duplicate
shared libraries where appropriate, then puts away old and orphaned
shared libaries to /usr/local/lib/compat/pkg
updating symlinks properly. To keep binaries working,
ldconfig(8)
is run after each library deletion or move.
portsclean
is so wise you can safely
run it without turning -i
on. However, if you
want to do further cleanup, specify the flag to be asked on possibly
unneeded libraries too.
You can use the sysutils/libchk port
to check which library is linked with which binaries.
-n
-
--noexecute
- Do not actually delete any files.
-P
-
--pkgclean
- Clean up outdated package tarballs and dead symlinks in the packages
directory. (cf.
PACKAGES
) Specified twice (i.e.
-PP
), delete all the package tarballs in the
directory.
-Q
-
--quiet
- Do not write anything to stdout. Specified twice (i.e.
-QQ
), do not write anything to stderr either. This
is for internal use.
-q
-
--noconfig
- Do not read the configuration file -
$PREFIX/etc/pkgtools.conf.
PORTSDIR
-
DISTDIR
-
WRKDIRPREFIX
-
PACKAGES
portsclean
detects these variables defined in the
configuration file $PREFIX/etc/pkgtools.conf,
/etc/make.conf or environment variables to clean
files properly. See
portupgrade(1)
for details of these variables.
PKGTOOLS_CONF
- Configuration file for the pkgtools suite. Default is
“$PREFIX/etc/pkgtools.conf”.
- $PREFIX/etc/pkgtools.conf
- Default location of the pkgtools configuration file.
Akinori MUSHA ⟨knu@iDaemons.org⟩