Browse guides

Keep the system up to date

Install security fixes and enable essential automatic updates.

Beginner7 min readUpdated
On this page

Update packages

Refresh the package index, review available updates, then install them during a maintenance window.

Terminal
sudo apt update
apt list --upgradable
sudo apt upgrade

Automate security fixes

unattended-upgrades automatically installs security updates according to your distribution settings.

Terminal
sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
systemctl status unattended-upgrades

Manage reboots

Terminal
if [ -f /var/run/reboot-required ]; then cat /var/run/reboot-required; fi
sudo apt autoremove

Before rebooting

Confirm that a recent backup exists and your services start automatically.