Linux Package Management Commands
Overview
Linux distributions use different package managers to handle software installation, updates, and removal. This document covers basic and commonly used package management commands for various package managers.
Debian-Based Systems (e.g., Ubuntu)
apt
The Advanced Package Tool (APT) is used for managing packages in Debian-based distributions.
Update Package List
Example
Upgrade Installed Packages
Example
Install a Package
Example
Remove a Package
Example
Search for a Package
Example
Show Package Details
Example
Red Hat-Based Systems (e.g., CentOS, Fedora)
yum
The Yellowdog Updater, Modified (YUM) is used for managing packages in older Red Hat-based distributions.
Update Package List and System
Example
Install a Package
Example
Remove a Package
Example
Search for a Package
Example
Show Package Details
Example
dnf
The Dandified YUM (DNF) is used for managing packages in newer Red Hat-based distributions.
Update Package List and System
Example
Install a Package
Example
Remove a Package
Example
Search for a Package
Example
Show Package Details
Example
SUSE-Based Systems
zypper
The command-line interface for managing packages in SUSE-based distributions.
Update Package List and System
Example
Install a Package
Example
Remove a Package
Example
Search for a Package
Example
Show Package Details
Example
General Package Management
rpm
The RPM Package Manager is used for managing packages in RPM-based distributions.
Install a Package
Example
Remove a Package
Example
Query Package Information
Example
Summary
Linux offers various package management tools depending on the distribution used. Understanding these commands helps in efficiently managing software installations, updates, and removals. For more detailed information on each command, refer to the Linux manual pages.