Keeping your Linux system updated ensures better security, bug fixes, and new features. While each Linux distribution uses a different package manager, updating from the command line is quick and reliable once you know the basics.
๐น Debian / Ubuntu (APT-based)
Distro Examples: Debian, Ubuntu, Linux Mint, Pop!_OS
Package manager: apt
Update commands:
sudo apt update
sudo apt upgrade
apt update refreshes the package list.
apt upgrade installs available updates.
For a full upgrade (handles dependency changes):
sudo apt full-upgrade
๐น Fedora / RHEL-based (DNF)
Examples: Fedora, RHEL, Rocky Linux, AlmaLinux
Package manager: dnf
Update command:
sudo dnf upgrade
This updates all installed packages.
To update and clean up old dependencies:
sudo dnf autoremove
๐น Arch Linux (Pacman)
Examples: Arch, Manjaro, EndeavourOS
Package manager: pacman
Update command:
sudo pacman -Syu
Updates package databases and upgrades the system in one step.
๐น openSUSE (Zypper)
Examples: openSUSE Leap, Tumbleweed
Package manager: zypper
Update command:
sudo zypper refresh
sudo zypper update
Tumbleweed (rolling release) users often use:
sudo zypper dup
๐น Universal Package Updates (Optional)
If you use Flatpak or Snap apps, update them too:
Flatpak:
flatpak update
Snap:
sudo snap refresh
Best Practices
๐ Update regularly to stay secure.
๐ Reboot after kernel updates.
๐ Check release notes before major upgrades.
๐ Use one package manager at a time to avoid conflicts.
Keeping your Linux distro updated from the command line is simple once you know the right commands. A few keystrokes can keep your system fast, secure, and stable.
