Package managers are tools used to install, update, remove, and manage software packages in Linux systems.
APT stands for Advanced Package Tool. Used in Debian-based distributions like Ubuntu.
sudo apt update # Update package list
sudo apt upgrade # Upgrade installed packages
sudo apt install package-name # Install a package
sudo apt remove package-name # Remove a package
sudo apt purge package-name # Remove package and config
sudo apt autoremove # Remove unused packages
YUM stands for Yellowdog Updater, Modified.
sudo yum check-update # Check for updates
sudo yum update # Update all packages
sudo yum install package-name # Install a package
sudo yum remove package-name # Remove a package
sudo yum list installed # List installed packages
⚠️ YUM is mostly replaced by DNF in newer systems.
DNF stands for Dandified YUM — modern replacement for YUM.
sudo dnf check-update # Check for updates
sudo dnf update # Update all packages
sudo dnf install package-name # Install a package
sudo dnf remove package-name # Remove a package
sudo dnf clean all # Clean cache
sudo dnf list installed # List installed packages
Pacman is the package manager for Arch-based systems.
sudo pacman -Syu # Sync and update system
sudo pacman -S package-name # Install package
sudo pacman -R package-name # Remove package
sudo pacman -Rs package-name # Remove with dependencies
sudo pacman -Q # List installed packages
sudo pacman -Ss package-name # Search for package
| Package Manager | Distros | Install Command | Update Command |
|---|---|---|---|
apt |
Debian, Ubuntu | sudo apt install nginx |
sudo apt update && upgrade |
yum |
RHEL, CentOS ≤7 | sudo yum install nginx |
sudo yum update |
dnf |
RHEL 8+, Fedora | sudo dnf install nginx |
sudo dnf update |
pacman |
Arch, Manjaro | sudo pacman -S nginx |
sudo pacman -Syu |
update or check-update before installing.search (apt search, dnf search, pacman -Ss) to find packages.autoremove or clean to reduce disk usage.Each Linux family uses a different package manager, but their purpose remains the same: efficient software management. Know your distro and master its tool for better system control.