Skip to main content

APT (Advanced Package Tool)

APT is the package manager used by Debian and Ubuntu systems.

Common Commands​

Update Package Lists​

Updates the list of available packages and their versions, but does not install or upgrade any packages.

sudo apt update

Upgrade Packages​

Installs newer versions of the packages you have. After updating the lists, use this to actually upgrade your system.

sudo apt upgrade

Install a Package​

Installs a specific package.

sudo apt install <package_name>

Example: sudo apt install tmux

Remove a Package​

Removes a package.

sudo apt remove <package_name>

Example: sudo apt remove cockpit

Remove Unused Packages​

Removes packages that were automatically installed to satisfy dependencies for other packages and are no longer needed.

sudo apt autoremove

Search for a Package​

Searches the package list for a given regex pattern.

apt search <search_term>

Show Package Information​

Displays details about a specific package.

apt show <package_name>