Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.


How do you upgrade only a portion of the available upgrades in Ubuntu? We were troubleshooting which update was breaking wordpress and needed to install only a few updates a time.

Normal Ubuntu Upgrades

To upgrade the suggested release updates on Ubuntu, you normally run the following update command:

sudo apt-get update
sudo apt-get upgrade

The problem with this is updating everything. Sometimes you want to see which install is causing problems. The simple way to do that is to install only some of the suggested modules and see if the problem is still present. By process of elimination and testing you can figure which module is causing a problem on your server.

This article will show you how to run only some of the upgrades that are available.

First, Update the Entire list of Updates

Using apt-get update (as root) will update your list of updates:

Do a Dry Run to See Suggested Updates

A dry run will show you what would of been upgraded, but doesn’t actually do the upgrade. Run the –dry-run flag as root:

Install the packages 1 by 1 Now

Now you can install them 1 by 1 and figure out which one is causing the problem.

sudo apt --only-upgrade install apache2
sudo apt --only-upgrade install apache2-bin
sudo apt --only-upgrade install apache2-data
sudo apt --only-upgrade install apache2-utils

If you have a particularly long list of packages to update you can put more than 1 together on a line and find the culprit by process of elimination, 1 section of packages at a time:

sudo apt --only-upgrade install apache2 apache2-bin
sudo apt --only-upgrade install apache2-data apache2-utils

Purge Unused

sudo apt clean
sudo apt autoclean
sudo apt autoremove
Last updated on 13 Jul 2023
Published on 13 Jul 2023