
Keeping your Linux system updated is crucial for security, stability, and access to the latest features. Depending on your Linux distribution, you’ll use APT, YUM, or DNF to manage updates. This guide covers the essentials for each.
📦 APT (Debian, Ubuntu, and derivatives)
APT is the package manager used in Debian-based systems like Ubuntu, Linux Mint, and Pop!_OS.
Update Package Lists
sudo apt update
This refreshes your local package index from the repositories.
Upgrade Installed Packages
sudo apt upgrade
This installs newer versions of installed packages without removing or installing anything new.
Full System Upgrade
sudo apt full-upgrade
This may install or remove packages as needed to satisfy dependencies.
📦 YUM (Older RHEL, CentOS)
YUM (Yellowdog Updater, Modified) is used in older Red Hat-based systems like CentOS 7.
Update & Upgrade Together
sudo yum update
YUM doesn’t separate update and upgrade commands—update
does both.
📦 DNF (Fedora, CentOS 8+, RHEL 8+)
DNF (Dandified YUM) is the modern replacement for YUM in newer RHEL-based systems.
Update & Upgrade
sudo dnf upgrade
Like YUM, DNF handles updates and upgrades in one step.
Refresh Package Cache (Optional)
sudo dnf check-update
This checks for available updates without installing them.
✅ Summary Table
Task | APT | YUM | DNF |
---|---|---|---|
Refresh Index | sudo apt update | N/A | sudo dnf check-update |
Upgrade Packages | sudo apt upgrade | sudo yum update | sudo dnf upgrade |
Full Upgrade (force) | sudo apt full-upgrade | N/A | sudo dnf upgrade |
How to Update and Upgrade Packages Using APT, YUM, or DNF (F.A.Q)
What's the difference between apt upgrade and apt full-upgrade?
apt upgrade
avoids removing packages; full-upgrade
may remove or install packages to satisfy dependencies.
Should I run apt update before apt upgrade?
Yes. apt update
refreshes the list of available packages.
Is DNF better than YUM?
Yes. DNF is faster, more reliable, and handles dependencies more efficiently.
Can I automate updates?
Yes. You can use tools like unattended-upgrades
(APT) or systemd timers (YUM/DNF) for automation.