Desktop Software Management

Desktop Software Management

Packages and mports

For normal desktop use, install prebuilt packages with mport. It resolves required dependencies and records installed files. Use the mports source tree only when a package is unavailable or when you need to build with different options.

Commands that change installed software require doas. Read-only queries do not. Replace package-name, search-term, and paths with the values relevant to your system.

Common tasks

Task Command What it does
Search for software mport search search-term Searches the available package index.
Inspect a package mport info package-name Shows the package description and metadata.
Install software doas mport install package-name Installs a package and its required dependencies.
List installed packages mport list Lists packages currently installed on the system.
Find updates mport list updates Lists installed packages with available updates.
Update one package doas mport update package-name Updates the specified installed package.
Upgrade all packages doas mport upgrade Updates all installed packages that are out of date.
Remove software doas mport delete package-name Removes the named installed package.
Remove unused dependencies doas mport autoremove Removes automatically installed packages no longer needed by another package.
Find a file's owner mport which /path/to/file Reports which installed package provided a file.
Check package integrity doas mport verify package-name Verifies files installed by a package.
Check security advisories doas mport audit Checks installed packages for known vulnerabilities.

Before updating

Review the update list first, then save open work and run the upgrade from a terminal. Desktop applications may need to be restarted after shared libraries are updated. Services such as CUPS, audio servers, or a graphical login manager may also need restarting, or a reboot may be the simplest way to ensure everything uses the new libraries.

Do not use autoremove until you have reviewed its proposed removals. A package installed automatically can still be useful if it is no longer required by another package.

Building from mports

Building from source takes more time and disk space than installing a package. When you deliberately choose that route, enter the port directory and install it:

cd /usr/mports/category/port-name
doas make install clean

See the mports documentation for collection and maintainer details. For everyday desktop package management, prefer the commands in the table above.