APT package manager

Overview and essential commands for Debian and Ubuntu.

APT (Advanced Packaging Tool) is the default and most powerful package manager for Debian, Ubuntu, and their derivatives (such as Linux Mint and Pop!_OS). It simplifies software management by automatically handling dependencies, searching repositories, installing, updating, and removing packages with ease and reliability.

Basic APT commands

The general syntax is:

apt [option] command [package1 package2 ...]

Updating the package list

Always update the package index before installing or upgrading packages:

sudo apt update

Installing Packages

  • Install a single package or multiple packages:
    sudo apt install package_name
    sudo apt install package1 package2
    
  • Install a package from a local .deb file:
    sudo apt install ./package.deb
    

Removing packages

  • Remove a package (configuration files are kept):
    sudo apt remove package_name
    
  • Completely remove a package including its configuration files:
    sudo apt purge package_name
    

Updating installed packages

  • Upgrade all installed packages:
    sudo apt upgrade
    
  • новление (с обработкой зависимостей и возможным удалением ненужных пакетов):
    sudo apt full-upgrade
    

(previously known as dist-upgrade)

Searching for packages

  • Search by name or description:
    apt search keyword
    
  • Show detailed information about a package:
    apt show package_name
    

Useful options

  • -y — automatically answer "yes" to all prompts:
    sudo apt upgrade -y
    
  • --no-install-recommends — do not install recommended packages:
    sudo apt install package_name --no-install-recommends
    

Additional helpful Ccmmands

  • Clean the local package cache:
    sudo apt clean
    
  • Remove automatically installed unused dependencies:
    sudo apt autoremove
    
  • View package operation history:
    apt history
    

Рекомендации

  • Always run sudo apt update before installing or upgrading packages.
  • Use sudo apt full-upgrade for a more complete and safer system upgrade.
  • Run sudo apt autoremove regularly to keep your system clean from unused dependencies.

Help

If you have any questions or need assistance, please contact us through the ticket system — we're always here to help!

Need help?Our engineers will help you free of charge with any question in minutesContact us