Skip to content

pkg

Terminal window
pkg [-h] [-i|-u] <package> [package...]

Installs or removes packages using the detected system package manager. Supports: paru, yay, pacman, apt, dnf, zypper, yum, brew, pkg.

(no flag) Auto mode: installs missing packages, removes installed ones
-i/--install Force install
-u/--uninstall Force uninstall
Terminal window
pkg firefox # auto: install if missing, remove if present
pkg -i ripgrep fd # force install
pkg -u cowsay # force uninstall
The package-installed check uses the correct query for each PM:
pacman/paru/yay pacman -Qi
apt dpkg -s
dnf/zypper/yum rpm -q
brew brew list
pkg pkg info