Often times, the need arises to deploy software as part of a solution. In instances where a pre-built VA does not exist, a common go-to has been spinning up a new VM and slamming Ubuntu Server LTS on it. Of course, this creates some technical debt for the “future you”, and when “future you” realizes that a new release of Ubuntu LTS was released, you’ll want to kick “past you” in the rear-end.
So what do you do? Take a snapshot so that “future you” can thank you, and then run with below.
1. Preparation & Cleanup
Before pulling the trigger, ensure your current system is “clean” and fully patched.
- Update & Patch:
sudo apt update && sudo apt full-upgrade -y - Remove Obsolete Packages:
Warning: This removes unused dependencies. Make sure you don’t need them!sudo apt autoremove --purge -y - Handle PPA Purging (Optional but Recommended):
If you have third-party repositories that might conflict with the new release:
sudo apt install ppa-purge sudo ppa-purge ppa:<name>
2. Verify Release Path
Ensure your system is looking for the next LTS (Long Term Support) version rather than the “normal” interim releases.
- Check Configuration:
cat /etc/update-manager/release-upgrades - Requirement: Ensure the line reads
Prompt=lts.
3. Reboot & Verify
It is best practice to reboot before the upgrade to ensure you are running the latest kernel and that the system is stable.
- Reboot:
sudo reboot - Confirm Current Version:
lsb_release -a
4. Execute the Upgrade
This is the “point of no return.” It’s best to do this over a stable connection (or via screen if working remotely).
- Start Upgrade:
sudo do-release-upgrade
Note: If the next LTS hasn’t been “officially” released for upgrades yet, you can force it with the-dflag, but proceed with caution.
