Loading ...

Updating Linux Distributions Using the Command Line (Debian, Fedora & More)

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.