apt vs yum — Package Managers Compared

apt and yum (and its successor dnf) are package managers used to install and update software, but on different Linux distribution families.

Published October 2, 2026

apt and yum (and its successor dnf) are package managers used to install and update software, but on different Linux distribution families.

Key points

  • apt is used on Debian-based distributions like Ubuntu; yum/dnf is used on Red Hat-based distributions like CentOS and Fedora
  • apt update refreshes the package index; apt upgrade installs available updates — yum/dnf combines both into a single "update" command
  • Package names and available versions can differ between the two ecosystems even for the same underlying software

Example

sudo apt update && sudo apt install nginx
More Linux articles