Documentation

Package management

Use pacman directly or the OnixOS opkg helper.

Documentation pagesPackage management
On this page

OnixOS uses pacman as its package manager. The onix-base package also provides opkg, a command-line helper for common update, install, removal and AUR tasks. opkg calls pacman for repository packages; it is not a separate package database.

Update the system

Use a full system upgrade:

sudo pacman -Syu

The opkg equivalent is:

opkg update

Do not refresh repository databases and then install packages without upgrading the system. Complete a full upgrade so installed packages stay in sync with the repository set.

Install and remove packages

Install from the configured repositories:

sudo pacman -S firefox

Install several packages in one transaction:

opkg install firefox git

Remove a package and its unused dependencies:

sudo pacman -Rns package-name

The helper can remove packages in the same way:

opkg remove package-name

Search and inspect

pacman -Ss keyword
pacman -Qi package-name
pacman -Qe

The first command searches repository metadata, the second shows an installed package’s details, and the third lists explicitly installed packages.

Install from the AUR

The OnixOS helper can clone, resolve and build an AUR package:

opkg aur package-name

AUR packages are user-maintained build recipes. Review the recipe before installing it. The current onix-base implementation requires Git and the base-devel toolchain for AUR builds.

Other opkg commands

Command Action
opkg update Refresh mirrors when reflector is installed, then perform a full system upgrade
opkg install PACKAGE… Install packages as part of a full upgrade
opkg aur PACKAGE… Build and install packages from the AUR
opkg remove PACKAGE… Remove packages and unused dependencies
opkg clean Remove unused package cache entries
opkg mirror Refresh mirrors and prepare the keyring

See the opkg source and manual for current behavior. The ArchWiki pacman guide covers pacman options in detail.