📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Linux Command Line Package Management

Package Management

5 min read Quiz at the end
Install packages with apt install on Ubuntu/Debian and dnf install on Red Hat. Always run apt update before installing. apt remove uninstalls and apt autoremove cleans unused dependency packages.

Installing Software

Debian/Ubuntu (apt)

sudo apt update
sudo apt install nginx
sudo apt upgrade
sudo apt remove nginx
apt search apache

Red Hat/CentOS (dnf/yum)

sudo dnf install nginx
sudo dnf update
sudo dnf remove nginx

Arch (pacman)

sudo pacman -S nginx
sudo pacman -Syu  # update all
Topic Quiz · 5 questions

Test your understanding before moving on

1. Which package manager does Ubuntu use?
💡 Ubuntu and Debian-based distros use apt (Advanced Package Tool).
2. sudo apt update does what?
💡 apt update refreshes the list of available packages and their versions.
3. How do you install nginx on Ubuntu?
💡 On Ubuntu: sudo apt install nginx.
4. Which distro uses pacman?
💡 Arch Linux uses the pacman package manager.
5. sudo apt upgrade does what?
💡 apt upgrade upgrades all installed packages to their latest available versions.