Catalog / Package Managers Cheat Sheet (apt, yum, brew)
Package Managers Cheat Sheet (apt, yum, brew)
A quick reference guide to common package management commands for apt (Debian/Ubuntu), yum (CentOS/RHEL), and brew (macOS). This cheat sheet provides essential commands for installing, updating, removing, and managing software packages on different operating systems.
apt - Debian/Ubuntu
Basic Package Management
|
Update the package lists. |
|
Upgrade all upgradable packages. |
|
Install a new package. |
|
Remove a package (leaving configuration files). |
|
Remove a package and its configuration files. |
|
Remove automatically installed dependencies that are no longer needed. |
Package Information
|
Show detailed information about a package. |
|
List all installed packages. |
|
Search for packages by keyword. |
|
Show the dependencies of a package. |
Managing Repositories
|
Main configuration file for APT repositories. |
|
Directory for additional repository files. |
|
Add a new repository (e.g., PPA). |
|
Update package lists after adding a repository. |
yum - CentOS/RHEL
Basic Package Management
|
Update all packages. |
|
Install a new package. |
|
Remove a package. |
|
Remove a package and its dependencies. |
|
Clean up cached package data. |
Package Information
|
Show detailed information about a package. |
|
List all installed packages. |
|
Search for packages by keyword. |
|
Find which package provides a specific file. |
Managing Repositories
|
Directory for yum repository configuration files. |
|
List all enabled yum repositories. |
|
Install yum-utils package, provides useful utilities. |
|
Download an RPM package without installing it (requires |
brew - macOS
Basic Package Management
|
Update Homebrew itself. |
|
Upgrade all outdated packages. |
|
Install a new package. |
|
Uninstall a package. |
|
Remove older versions of installed packages. |
Package Information
|
Show information about a package. |
|
List installed packages. |
|
Search for packages by keyword. |
|
Show dependencies for a package. |
Managing Brew
|
Diagnose potential problems with your brew setup. |
|
Display Homebrew’s configuration info. |
|
Install a cask (GUI application). |
|
Add a new tap (unofficial repository). |
Common Operations Across Package Managers
Finding Packages
|
Search for a package by name or description. |
|
List all installed packages. |
Updating Packages
|
Update the package list and upgrade packages. |
|
Remove unneeded dependencies and clean up old versions. |
Installing and Removing
|
Install a specific package. |
|
Remove a specific package. |