Home

If you find any mistakes here or anywhere else on my website, email website@CoryHufford.com.


Package Manager Cheat Sheet

December 1, 2026

Table 1 - Common Linux distributions and their package managers.
Package Format Family Package Manager Distribution Release Type
apk Alpine apk Alpine Linux Point
bsdtar Arch pacman Arch Linux Rolling
CachyOS Rolling
EndeavourOS Rolling
deb Debian apt Debian Point
Linux Mint Point
Pop OS Point
Ubuntu Point
rpm Fedora dnf AlmaLinux Point
CentOS Point
Fedora Point
Rocky Linux Point
openSUSE zypper openSUSE Leap Point
openSUSE Tumbleweed Rolling

Table 2 below has some commonly needed commands for the package managers from Table 1. The commands in each column do not necessarily do the exact same thing for each package manager, since different package managers do not necessarily work the same. Some package managers also have several slightly different ways of doing the same thing. The commands in Table 2 are what I think are reasonable commands for a typical installation of the distribution on a daily driver machine.

Table 2 - Common package manager operations.
Package Manager Operation Commands
apk Update packages
apk update
apk upgrade
Install package
apk add <name>
Uninstall package
apk del --purge <name>
List installed packages
apk list --installed
Search available packages
apk search <text>
apt Update packages
apt update
apt full-upgrade
apt autoremove --purge
Install package
apt install <name>
Uninstall package
apt purge --autoremove <name>
List installed packages
apt list --installed
Search available packages
apt search <text>
dnf Update packages
dnf upgrade --refresh
dnf autoremove
Install package
dnf install <name>
Uninstall package
dnf remove <name>
List installed packages
dnf list --installed
Search available packages
dnf search <text>
pacman Update packages
pacman --sync --refresh --sysupgrade
Install package (and update
packages; see below)
pacman --sync --sysupgrade <name>
Uninstall package
pacman --remove --nosave --recursive <name>
List installed packages
pacman --query
Search available packages
pacman --sync --search <text>
zypper Update packages, except on
openSUSE Tumbleweed
zypper refresh
zypper update
Update packages on
openSUSE Tumbleweed
(see below)
zypper refresh
zypper dist-upgrade
Install package
zypper install <name>
Uninstall package
zypper remove --clean-deps <name>
List installed packages
zypper search --installed-only --details
Search available packages
zypper search <text>

Packages can be installed using pacman with pacman --sync <name>, but this is unsafe if the system is not fully up to date and the package is already installed - that would be a partial upgrade, which is not supported. See the Arch Wiki here.

openSUSE Tumbleweed's rolling releases are vaguely like point releases, but where the point releases are generally invisible to the user and released very frequently. This is why Tumbleweed needs zypper dist-upgrade rather than zypper update. See the documentation here.


Back to top

Home