Forrest logo
tool overview
On this page you find all important commands for the CLI tool apt. If the command you are looking for is missing please ask our AI.

apt

APT (Advanced Package Tool) is a command-line tool used on Debian-based Linux distributions to manage software packages. It is often considered the backbone of package management in these systems. APT provides a simple and efficient way to install, upgrade, and remove packages on the system.

Using APT, users can search for available packages, retrieve detailed information about them, and perform operations such as installation or removal with a single command. APT resolves dependencies automatically, ensuring that all required packages are installed before installing a new package.

APT manages a centralized package repository known as the APT repository, where all available packages and their dependencies are stored. This repository can be configured to use different sources based on user preferences or system requirements.

APT supports various command-line options, allowing users to perform specific tasks such as updating package lists, upgrading installed packages, or searching for specific packages by name or description. It also enables users to manage software repositories, add or remove package sources, and perform system-wide package upgrades.

APT provides advanced features like safe-upgrade, which ensures that any package upgrades do not break system stability by automatically resolving conflicts and checking for potential issues before applying changes.

APT also includes tools like apt-cache, apt-get, and apt-file, which offer additional functionalities for package caching, retrieving files from packages, and searching for files provided by packages.

With APT, users can easily maintain a stable and up-to-date software environment, ensuring the security and functionality of their Linux systems. It has greatly simplified package management for Linux users and administrators, making it a powerful tool for software installations and updates.

List of commands for apt:

  • apt-file:tldr:ab44f apt-file: Update the metadata database.
    $ sudo apt update
    try on your machine
    explain this command
  • apt-moo:tldr:6a8a5 apt-moo: Print a cow easter egg.
    $ apt moo
    try on your machine
    explain this command
  • apt:tldr:03a07 apt: List all packages.
    $ apt list
    try on your machine
    explain this command
  • apt:tldr:3157c apt: List installed packages.
    $ apt list --installed
    try on your machine
    explain this command
  • apt:tldr:3d111 apt: Search for a given package.
    $ apt search ${package}
    try on your machine
    explain this command
  • apt:tldr:83f73 apt: Show information for a package.
    $ apt show ${package}
    try on your machine
    explain this command
  • apt:tldr:b1d28 apt: Upgrade all installed packages to their newest available versions.
    $ sudo apt upgrade
    try on your machine
    explain this command
  • apt:tldr:d3849 apt: Remove a package (using `purge` instead also removes its configuration files).
    $ sudo apt remove ${package}
    try on your machine
    explain this command
  • apt:tldr:fe7b2 apt: Install a package, or update it to the latest available version.
    $ sudo apt install ${package}
    try on your machine
    explain this command
  • debsecan:tldr:4ce4f debsecan: Upgrade vulnerable installed packages.
    $ sudo apt upgrade $(debsecan --only-fixed --format ${packages})
    try on your machine
    explain this command
  • php:modules:install:zip This command installs the PHP 8.1 zip extension on Linux
    $ apt install php-zip
    try on your machine
    explain this command
  • php:version:install Install a given PHP version.
    $ sudo apt install software-properties-common
    $ sudo add-apt-repository ppa:ondrej/php
    $ sudo apt update
    $ sudo apt install php${version}
    try on your machine
    explain this command
  • snapd:install Installs snap package manager on Linux.
    $ apt install snapd
    try on your machine
    explain this command
tool overview