How to Update and Upgrade Ubuntu Safely

Keeping Ubuntu updated is an important maintenance task. Before a major release upgrade, use backups and read the release-specific documentation rather than treating it like a normal package update.

Before You Begin

  • Back up important data before changing partitions, boot configuration, authentication, or server networking.
  • Prefer official distribution repositories and vendor documentation for installation commands.

Step-by-Step Guide

  1. Back up important documents and server configuration before significant changes.
  2. Run: sudo apt update
  3. Review pending upgrades if desired with: apt list –upgradable
  4. Apply normal package updates with: sudo apt upgrade
  5. If the update includes a kernel or other components requiring a reboot, restart when convenient.
  6. After rebooting, confirm the system is healthy and check available disk space.
  7. For a release upgrade, use Ubuntu's supported release-upgrade process and review third-party repositories first.

Common Mistakes to Avoid

  • Copying commands from an untrusted website without understanding what they change.
  • Using sudo for every command instead of only when administrative privileges are required.
  • Changing several variables at once, which makes troubleshooting harder.
  • Deleting files or disabling security controls before identifying the actual cause.

Useful Commands

man command
command --help
sudo journalctl -xe

Replace command with the tool you are investigating. For destructive operations, read the manual page and verify the target before pressing Enter.

Official Documentation

Open the relevant official documentation

Final Thoughts

Linux troubleshooting is most effective when you work from evidence: identify the affected component, inspect its state and logs, make one controlled change, and verify the result. That approach is safer and easier to reproduce than applying a list of unrelated fixes.