OnCallReady

Commands

apt - package manager for Debian and Ubuntu

apt [update|upgrade|install|remove|autoremove|list|show|search] [package...]

Options you will use

update
Refresh the package lists. Downloads NO packages. Always first.
upgrade
Install newer versions of everything installed.
install PKG
Install a package and its dependencies.
remove PKG
Remove a package but keep its config files.
purge PKG
Remove the package and its config.
autoremove
Remove dependencies nothing needs any more (old kernels live here).
list --installed / --upgradable
What is installed, or what has an update.
show PKG, search TERM
Package details, and search the descriptions.
-y, --yes
Assume yes. Required in scripts and CI.
--no-install-recommends
Install only the hard dependencies, not the "recommended" extras (smaller images).

Examples

$ sudo apt update && sudo apt upgrade -y

the pair, in that order

$ sudo apt install -y tree jq

the tools this course uses

Gotchas

Taught in

Try apt in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.