apt

Install, update and remove software

What it does

apt is the package manager of Ubuntu and Debian. update downloads fresh package lists but installs nothing, so you run it before install and upgrade. upgrade updates everything installed, and install adds a package with its dependencies.

remove removes a package but keeps its settings, purge removes them too, and autoremove clears out dependencies nothing needs any more. apt search <word> looks for a package by name and description. Scripts use apt-get instead of apt, since its output stays stable.

Syntax

sudo apt update
sudo apt upgrade
sudo apt install <package>
sudo apt remove <package>

Examples

Related commands

Practise · All commands