Skip to main content
An unpatched server is the easiest kind of server to compromise. Ubuntu and Debian make patching straightforward: one command refreshes the package index, another installs the updates. Automating it takes a few minutes and pays off forever.

Update the package index

Refresh the list of available packages from Ubuntu or Debian’s repositories.

Install available upgrades

Remove packages you no longer need

Check if a reboot is required

Some updates (especially kernel updates) do not take effect until you reboot.
If a reboot is needed, see Power Controls.

Enable automatic security updates

1

Install unattended-upgrades

2

Enable it

Select Yes when prompted.
3

Verify it is running

Automatic updates handle security patches only by default. You should still run sudo apt upgrade periodically to keep everything else current.

Search for a package

Fix broken packages

If an update is interrupted or a package fails to install: