| ADDPKG(8) | System Manager's Manual | ADDPKG(8) |
addpkg — install
or upgrade a package
addpkg |
[-fu] [-r
root] package |
addpkg |
-h | -v |
addpkg installs the package archive
package, as built by
mkpkg(8). Name and version are taken
from the file name,
name#version-release.pkg.tar.ext.
It must be run as root.
The installation runs these steps, in order:
-u is not given,
or if -u is given and the package is not
installed.The metadata is described under groups, services, permissions and capabilities in MAKEPKG(5).
The options are as follows:
-f-u.-h-r
root-u-vIf the directory holding package also holds a .footprint, the package is compared with it before anything is installed. If that directory is a locked port, with a MAKEPKG.lock, .footprint.lock is used instead. Without a footprint file the check is skipped. A footprint file that cannot be read, or a package whose contents cannot be listed, blocks the installation.
Entries are reported under “changed”,
“missing” and “new”. Changed and missing entries
always block the installation. New entries block it unless
IGNORE_NEW=yes is set in
/etc/mkpkg.conf. -f skips
the check.
On a fresh install every file is extracted.
On an upgrade, a file under etc/ that already exists is left alone and the new one is placed beside it as file.new, unless the two are identical. The staged files are listed.
On a forced reinstall of the same version, existing files under etc/ are not touched; missing ones are installed. They stay in the database either way.
After the files are in place, addpkg runs
a command for each kind of path the operation added or removed. Each command
runs at most once, is announced on standard error, and is skipped quietly if
it is not installed.
depmod -a
version, for each version whose directory
exists.limine-sync.systemd-hwdb
update.fc-cache
-s.glib-compile-schemas.gdk-pixbuf-query-loaders
--update-cache.update-mime-database.gtk-update-icon-cache
-q /usr/share/icons/hicolor.update-desktop-database.sv restart
/etc/sv/service, if the service is
running.IGNORE_NEW; see
mkpkg.conf(5).The addpkg utility exits 0 on
success, and >0 if an error occurs.
Install a freshly built package from its port directory:
# addpkg
/usr/ports/core/zlib/zlib#1.3.1-1.pkg.tar.gzUpgrade it:
# addpkg -u
/usr/ports/core/zlib/zlib#1.3.2-1.pkg.tar.gzMAKEPKG(5), mkpkg.conf(5), delpkg(8), infopkg(8), mkpkg(8), pkg(8)
| September 27, 2026 | mkpkg 1.6.0 |