Install and manage software on Ubuntu/Debian — refresh the package list, search for and install packages, apply security updates, remove what you no longer need, and see what is already installed.
On Ubuntu/Debian, apt installs software from trusted online catalogs called repositories — no hunting for downloads. apt update refreshes the local list of what is available and at which version (it installs nothing); apt upgrade then actually installs the newer versions. Always update before installing, so you get current packages. Both need sudo.
Refresh the list of available packages and versions (installs nothing)
sudo apt updateInstall all available updates for packages you already have
sudo apt upgradeapt search finds packages by keyword when you are not sure of the exact name. apt install then downloads the package and everything it depends on, and sets it up — one command, no manual dependency chasing. You can install several at once by listing them.
Search the catalog by keyword
apt search "http server"Install one package (and automatically anything it needs)
sudo apt install nginxInstall several at once
sudo apt install git curl htopapt remove uninstalls a package but keeps its config files, in case you reinstall later; purge removes the config too. After removing things, autoremove cleans up dependencies that were pulled in automatically and are now unused — a quick way to reclaim space.
Uninstall a package (keeps its config files)
sudo apt remove nginxUninstall AND delete its config files
sudo apt purge nginxClean up dependencies nothing needs anymore
sudo apt autoremoveapt list --installed shows everything currently installed — usually piped into grep to check for one thing. For details about a specific package (version, size, what it does, what it depends on) before you install it, apt show is the command.
Is a particular package installed? (filter the full list)
apt list --installed | grep nginxShow details about a package: version, size, description, dependencies
apt show nginx