oldfiles(1)

NAME
oldfiles - display old packages and sources

SYNOPSIS
oldfiles [options]

DESCRIPTION
oldfiles is a script to list outdated packages, sources, and build logs on a CRUX system with central directories for those pkgmk(8) and prt-get(8) artifacts. The global config /etc/pkgmk.conf(5) must define PKGMK_SOURCE_DIR and PKGMK_PACKAGE_DIR (if using -s or -p), and /etc/prt-get.conf(5) must define writelog enabled and a template for logfile (if using -l).

Without any options, oldfiles will display the sources and packages that do not agree with the latest version of the ports. The list of ports is governed by prtdir directives in prt-get(8), so deactivating a repository in /etc/prt-get.conf will result in all its ports' sources and packages being flagged as old.

OPTIONS

-p  list built packages

-s  list downloaded sources

-l  list build logs

If no class of build artifacts is specified, then all outdated packages and sources will be listed. To enable the search for build logs, you must pass the -l flag explicitly.

-i  assemble the mask of wanted files using only ports that are currently installed. This option lets you detect build artifacts associated with any port not currently installed, even if the package and the downloaded sources are the latest version. Closely related ports that use the same source files, if installed, will keep those sources from appearing in the final list; hence this flag is mostly harmless when you have one of several variants installed (say, emacs-gtk3 but not emacs-nox11).

EXAMPLES

oldfiles
    will list all outdated sources and packages.

oldfiles -p
    will list all outdated packages.

oldfiles -p -i
    will list all packages that are not the current version, or that were built but not installed (often due to footprint mismatch, but other reasons are possible).

comm -2 <(oldfiles -p | sort) <(oldfiles -p -i | sort)
    will list all packages that were built but not installed (a slight variation on grep -ilr "footprint mismatch found:" /var/log/pkgbuild if you save all your build logs in /var/log/pkgbuild. Note that the grep(1) command cares nothing about packages and their installation status, whereas the comm(1) command cares nothing about why the package exists but is not installed. Hence the two commands reveal slightly different information about your built packages.)

oldfiles -p -i | xargs rm
    will remove all packages that are not the current version, or that are not associated with any installed port.

oldfiles -l -i | xargs rm
    will remove the logs of all previous builds, and the build logs of any port not currently installed.

CONFIGURATION
oldfiles looks for the file /etc/oldfiles.conf (if present) that contains a list of files that should be kept. The format is a simple list of filenames (full path required). For example, if you share a directory of built packages among other CRUX machines using pkg-get(1) and portspage(1), you can put something like the following into /etc/oldfiles.conf so that the metadata files and html index will be omitted from the output.

    /usr/pkgmk/packages/PKGREPO
    /usr/pkgmk/packages/PKGDEPS
    /usr/pkgmk/packages/PKGREAD
    /usr/pkgmk/packages/PKGINST
    /usr/pkgmk/packages/index.html

AUTHORS
Simone Rota <sip@varlock.com>

Mark Rosenstand <mark@borkware.net>

John McQuah <jmcquah@disroot.org>

SEE ALSO
pkgmk(8), prt-get(8)