Skip to content

Linux Package Management Cheatsheet

  • by

Package management is a crucial part of administering a Linux system. Different distributions use different package managers, each with its own commands. Here’s a quick reference for the most commonly used package management tools across popular distributions.


Debian-based (APT – Advanced Packaging Tool)

Distributions: Debian, Ubuntu, Linux Mint, Pop!_OS

TaskCommand
Update package listssudo apt update
Upgrade installed packagessudo apt upgrade
Install a packagesudo apt install <package>
Remove a packagesudo apt remove <package>
Remove unnecessary dependenciessudo apt autoremove
Search for a packageapt search <package>
Show package infoapt show <package>
List installed packagesdpkg -l

RPM-based (DNF/YUM)

Distributions: Fedora, RHEL, CentOS, Rocky Linux, AlmaLinux

TaskDNF CommandYUM Command
Update package listssudo dnf check-updatesudo yum check-update
Upgrade installed packagessudo dnf upgradesudo yum update
Install a packagesudo dnf install <package>sudo yum install <package>
Remove a packagesudo dnf remove <package>sudo yum remove <package>
Remove unused dependenciessudo dnf autoremovesudo yum autoremove
Search for a packagednf search <package>yum search <package>
Show package infodnf info <package>yum info <package>
List installed packagesdnf list installedyum list installed

Arch-based (Pacman)

Distributions: Arch Linux, Manjaro, EndeavourOS

TaskCommand
Update package lists and systemsudo pacman -Syu
Install a packagesudo pacman -S <package>
Remove a packagesudo pacman -R <package>
Remove package and dependenciessudo pacman -Rns <package>
Search for a packagepacman -Ss <package>
Show package infopacman -Si <package>
List installed packagespacman -Qe

openSUSE (Zypper)

Distributions: openSUSE Leap, openSUSE Tumbleweed

TaskCommand
Refresh repositoriessudo zypper refresh
Upgrade installed packagessudo zypper update
Install a packagesudo zypper install <package>
Remove a packagesudo zypper remove <package>
Search for a packagezypper search <package>
Show package infozypper info <package>
List installed packageszypper se --installed-only

Gentoo (Portage – emerge)

Distributions: Gentoo

TaskCommand
Sync repositoriessudo emerge --sync
Update installed packagessudo emerge -uD @world
Install a packagesudo emerge <package>
Remove a packagesudo emerge --deselect <package>
Search for a packageemerge --search <package>
Show package infoemerge --info <package>
List installed packagesequery list

Slackware (pkgtools, slapt-get, sbopkg)

Distributions: Slackware

TaskCommand
Install a packageinstallpkg <package>.txz
Remove a packageremovepkg <package>
Upgrade a packageupgradepkg <package>.txz
Search for a packageslapt-get --search <package>
Install from SlackBuildssbopkg -i <package>

Other Package Managers

  • Flatpak: flatpak install <package> (Universal package format for Linux)
  • Snap: snap install <package> (Canonical’s universal package manager)
  • AppImage: Run with ./<AppImageFile> (No installation needed)

This cheatsheet provides essential commands for managing packages across various Linux distributions. Whether you use Debian-based, RPM-based, Arch, or others, knowing the right commands makes Linux administration more efficient!

For Tech News – visit Gee-Tech.com

fix slow Linux performance

How to Fix Common Linux Performance Issues + Top Tools to Speed Up Your System

Why Is Your Linux System Running Slow? Linux is known for its speed and efficiency—but even the most…

arch based linux distribution

Top 15 Arch Based Linux Distributions in 2026

Why Choose an Arch Based Linux Distribution? Arch Linux has long been known for its rolling release …

linux kernel 7

Linux Kernel 7.0: The Next Major Chapter in Linux Development

The Linux ecosystem is preparing for an important milestone: Linux Kernel 7.0. While Linux kernel ve…