Intermediate · 12 min · practise every command in the built-in terminal

🎯 Mission Briefing: The Upgrade Window

It's Sunday night — the one weekly window where you're allowed to touch production. A backlog of package upgrades is waiting, but you can't just blindly upgrade and walk away: check what's outdated, apply it, confirm the web server survived, and clean up afterward.

Your objective

Refresh the package index, upgrade what's pending, restart the affected service, and reclaim disk space from old package files.

Maintenance toolkit

sudo apt update
apt list --upgradable
sudo apt upgrade
sudo systemctl restart nginx
sudo apt autoremove
sudo apt autoclean

Confirm the window went cleanly

systemctl status nginx
df -h

No maintenance window is done until the service is verified healthy and the disk is checked.

Practice tasks

  1. Refresh the package index before doing anything else
  2. See what packages are pending an upgrade
  3. Apply the pending upgrades
  4. Restart nginx to make sure it comes back cleanly after the upgrade
  5. Clean up leftover package files to reclaim disk space

Commands in this lesson

Missions