Skip to content

Linux Package Management (APT, DNF & Pacman)

Modern Linux distributions manage software through centralized package repositories. Choose your distribution tab inside each step to run the appropriate command.


Step 1: Refresh Repositories and Review System Updates

01

Refresh Repositories and Review System Updates

Repository

Refresh package metadata first, then review and apply system updates as a separate, planned action. A full upgrade can restart services or require a reboot. Pacman requires a full system upgrade with -Syu; avoid refreshing only its package database with -Sy because partial upgrades are unsupported.

Terminal window
sudo apt update
apt list --upgradable
sudo apt upgrade

Step 2: Install Software Packages

02

Install Software Packages

Installation

Install primary sysadmin utilities along with their necessary library dependencies:

Terminal window
sudo apt install -y htop curl git ufw

Step 3: Search Remote Repositories

03

Search Remote Repositories

Discovery

Query official distribution repositories to find exact package names and versions:

Terminal window
apt search PACKAGE

Step 4: Clean Orphaned Packages & Caches

04

Clean Orphaned Packages & Caches

Maintenance

Preview cleanup before confirming package removals. Package managers prompt before removing dependencies or clearing caches; read the proposed changes and stop if an application still needs a package.

Terminal window
sudo apt autoremove --purge && sudo apt clean

Comments