A little APT maintenance prevents the two classics: broken upgrades and mysterious disk loss. This minimal routine keeps package lists and disk usage under control.
Minimal routine
- Update package lists:
sudo apt update - Apply patches when scheduled:
sudo apt upgrade - Cleanup:
sudo apt autoremovesudo apt clean
What to watch
- Disk usage creeping up
- Services marked failed after patching—run post-upgrade cleanup and verify with routine service health checks
FAQ
How often should I run this?
At least after any manual upgrade; many teams run apt update weekly and apt upgrade on a planned window. Always follow with a quick check of systemctl --failed and key services.
What if the disk is already full?
Stop before running large upgrades. Reclaim space first using the full root disk cleanup guide, then resume maintenance.
Related
- Ubuntu upgrade cleanup checklist — post-upgrade cleanup
- Fix a full root disk on Ubuntu WordPress servers — disk-full recovery
- Ubuntu security updates and WordPress risk — security update strategy