Ubuntu Updates Best Practices

April 12 2023 1:19am • Est. Read Time: 3 MIN


One of the great things about using Ubuntu is the fantastic update support provided by default upon installation. That said, there are some things to be aware of with when working with Ubuntu updates. This knowledge base article will cover the basics of what to know and how to address things when updates go poorly.

Setup a fallback plan now - please do it today

- Please don't wait until something breaks, backup your data today to an external USB drive or cloud service. 

- Also, if downtime isn't an option, setup and use Timeshift to get back to good working order in a matter of minutes - you can troubleshoot update failures later. TimeShift restoration will be trickier if you’re using drive encryption. But it is completely doable. ++This guide here++ will help you.

By doing those two things above, an update that goes poorly will go from something severe to a minor inconvenience. It will allow you to resume your daily tasks while providing you a means of troubleshooting what may have gone wrong with an update gone rouge.

 

A word about PPAs

PPAs (Personal Package Archives) are a helpful means of getting software installed on your Ubuntu installation if the desired software or package isn't available in the official repositories. Unfortunately, some PPAs can actually mess up the existing packing structure, thus causing problems when you try to update your existing packages or install new ones from the official repositories. While very rare, it's worth noting this. 

If you're finding that you're experiencing package breakage, disabling any active PPAs and trying again.

  1. Launch Software & Updates.
  2. Click the “Other Software” tab.
  3. Select (click) the PPA you want to delete.
  4. Click “Remove” to remove it.
  5. Then run your updater again.


What to expect when running Ubuntu updates

If you've made no changes to the Ubuntu defaults, you'll find that most updates that come along are pretty stable. However, it's not unheard of for ++regressions to appear++ or perhaps something changed with the flow of your favorite software. Rare as it is, I've seen it happen.

There are two things we can do here to mitigate any likelihood of surprises.

- Setup and use Timeshift and also backup your home directory as outlined at the beginning of this article.

- Install only Security updates only.


About installing only critical updates

Choosing to install only the most critical of Ubuntu updates while skipping over those that might not be wanted or needed be useful in some situations. But there are some things to know about this.

- This approach is best for those who have a working environment that they wish to lock in. Meaning, their setting up an environment and they want it completely left alone as much as possible. 

- Lastly, going this route generally means you'll want to do a clean install when moving to a brand new Ubuntu release. Not saying you can't do in place upgrades, but if your packages are largely unchanged, upgrading will be very messy and best to do a clean install for release upgrades if using critical updates only.

- Advantages to this approach include only receiving needed updates you need to remain secure, but also avoiding anything that might change your existing workflow unannounced.


How to install only critical updates

Ubuntu users can change their updates from the defaults, which "updates everything", into "installs all updates to security updates, and downloads only", with installation needing to take place manually. This allows you to make sure you’re not in the middle of anything important before your updates are installed.

- Go to Activities, search Software and Updates.

- Browse to the Updates tab.

- Change "Subscribed to" from all updates to security updates only.



Additionally, on the same tab, it’s recommended only to be notified about LTS (++Long Term Support++) versions  if you’re currently on an LTS. Leave this notification section alone if you’re on a release ending in .10.

If updates break something

While highly unlikely, if you experience package breakage where you find you're unable to update package at all, there are some things we can do.

- Open a terminal from Activities.

- Now paste in the following, but only as described below:

First let's try to update our package list again:


sudo apt update


If that fails, then we move onto the next step:


sudo apt clean


then try again:


sudo apt update


If this went successfully, we can now run upgrades to our installed packages (software):


sudo apt upgrade


If however, this doesn't work, we'd run:'


sudo apt-get install -f && sudo apt update && sudo apt upgrade


If it's complaining about one package not updating, we can attempt to fix it with:


sudo apt update && sudo apt-get install --reinstall package_name