Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

Linux Package Management Cheat Sheet

Linux Package Management Cheat Sheet

Back to Operating Systems and CLI
Updated 2026-05-20
Next Topic: Linux Process Management Cheat Sheet

Linux package management spans multiple ecosystems: APT/dpkg for Debian/Ubuntu, DNF/rpm for RHEL/Fedora, pacman for Arch Linux, plus cross-distro tools like Homebrew, snap, and Flatpak. Each manager handles dependency resolution, repository sources, and package lifecycle—install, update, remove, and query—through its own command syntax and configuration files. This cheat sheet covers the core commands and advanced workflows for all major package managers, with dpkg and rpm low-level tools included for direct package inspection and scripting.

What This Cheat Sheet Covers

This topic spans 12 focused tables and 140 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: APT Core Commands (Debian/Ubuntu)Table 2: APT Repository Management & Package MaintenanceTable 3: dpkg Low-Level CommandsTable 4: DNF Core Commands (RHEL/Fedora)Table 5: DNF Advanced: History, Modules & RepositoriesTable 6: rpm Low-Level CommandsTable 7: pacman Core Commands (Arch Linux)Table 8: pacman Cache, Repositories & AUR HelpersTable 9: Homebrew Core Commands (macOS/Linux)Table 10: Homebrew Advanced: Bundle, Services & TapsTable 11: snap Universal PackagesTable 12: Flatpak Universal Packages

Table 1: APT Core Commands (Debian/Ubuntu)

APT (Advanced Package Tool) is the primary package manager for Debian and Ubuntu. These commands cover the full lifecycle: syncing the package index, installing, upgrading, removing, and querying packages. Run apt update before any install or upgrade to ensure you're working with current package metadata.

APT Core CommandExampleDescription
apt update
apt update
Refresh package index from all configured repositories
apt upgrade
apt upgrade
Upgrade all installed packages to newest available version
apt full-upgrade
apt full-upgrade
Upgrade packages, allowing removal of obsolete packages if needed
apt install
apt install nginx
Install a package and all its dependencies
apt install (specific version)
apt install nginx=1.24.0-1
Install a specific version of a package
apt reinstall
apt reinstall nginx
Reinstall a package without removing user configuration
apt remove
apt remove nginx
Remove a package, keeping its configuration files
apt purge
apt purge nginx
Remove a package including all its configuration files

More in Operating Systems and CLI

  • Linux File System Structure and FHS Cheat Sheet
  • Linux Process Management Cheat Sheet
  • AWS CLI Cheat Sheet
  • File Permissions Cheat Sheet
  • macOS Usage Cheat Sheet
  • Windows 11 Troubleshooting Cheat Sheet
View all 31 topics in Operating Systems and CLI