apt-get

A command-line package management utility for Debian-based Linux systems.

apt-get serves as a sophisticated front-end for the dpkg package manager. When a user requests a software installation, apt-get queries configured repositories (typically defined in /etc/apt/sources.list), calculates the dependency graph to resolve any missing libraries, downloads the necessary .deb files, verifies their GPG signatures, and delegates the actual installation to dpkg. Unlike the newer apt command, which is optimized for interactive user experience, apt-get guarantees a stable command-line interface (CLI) output, making it the standard choice for bash scripts, Dockerfiles, and server automation.

        graph LR
  Center["apt-get"]:::main
  Pre_linux["linux"]:::pre --> Center
  click Pre_linux "/terms/linux"
  Rel_bash["bash"]:::related -.-> Center
  click Rel_bash "/terms/bash"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧒 Explain Like I'm 5

Think of apt-get as the App Store for a [Linux](/en/terms/linux) computer, but operated entirely by typing text. You tell it what app you want, and it automatically finds it, downloads it, and figures out all the extra pieces the app needs to run properly.

🤓 Expert Deep Dive

The architecture of apt-get relies on libapt-pkg for dependency resolution and state tracking. It employs a topological sorting [algorithm](/en/terms/sorting-algorithm) to determine the correct installation order of packages. A critical distinction in modern Debian/Ubuntu environments is the dichotomy between apt and apt-get: while apt introduces progressive features like progress bars and formatting changes that can break parsers, apt-get maintains backward compatibility and predictable stdout/stderr streams. This invariant makes apt-get strictly preferred for CI/CD pipelines and infrastructure-as-code provisioning.

🔗 Related Terms

Prerequisites:

📚 Sources