Amiga Unix — 68040 · 68060

Manual pages › System administration commands (1M)

removef-apkgeng(1M)

remove a file from software database

Package: APKGENG, added for amigaux.

This is apkg's own copy, /usr/apkg/bin/removef, off the search path; removef at the shell runs the original: see removef(1M).

removef - remove a file from software database

removef [-R root_path] pkginst path...

removef [-R root_path] -f pkginst

removef informs the system that the user, or software, intends to remove a pathname. Output from removef is the list of input pathnames that may be safely removed (no other packages have a dependency on them).

The following options and operands are supported:

After all files have been processed, removef should be invoked with the -f option to indicate that the removal phase is complete.
Define the full path name of a directory to use as the root_path. All files, including package system information files, are relocated to a directory tree starting in the specified root_path. The root_path may be specified when installing to a client from a server (for example, /export/root/client1).
removef inherits the value of the PKG_INSTALL_ROOT environment variable. (See ENVIRONMENT VARIABLES, below.) If PKG_INSTALL_ROOT is set, such as when the -R option is used with pkgadd(1M) or pkgrm(1M), there is no need to use the removef -R option.
The pathname to be removed.
The package instance from which the pathname is being removed.

Example 1 Using removef

The following example uses the removef command in an optional pre-install script:


echo "The following files are no longer part of this package
and are being removed."
removef $PKGINST /dev/xt[0-9][0-9][0-9] |
while read pathname
do
echo "$pathname"
rm -f $pathname
done
removef -f $PKGINST || exit 2

removef inherits the value of the following environment variable. This variable is set when pkgadd(1M) or pkgrm(1M) is invoked with the -R option.

If present, defines the full path name of a directory to use as the system's PKG_INSTALL_ROOT path. All product and package information files are then looked for in the directory tree, starting with the specified PKG_INSTALL_ROOT path. If not present, the default system path of / is used.

pkginfo(1), pkgmk(1), pkgparam(1), pkgproto(1), pkgtrans(1), installf(1M), pkgadd(1M), pkgask(1M), pkgchk(1M), pkgrm(1M)

2/25/07 Heirloom Packaging Tools