Not all updates can be installed

If you run Ubuntu, you’ll notice that every now and then the Software Updater will provide you with a notification

Updated software is available for this computer. Do you want to install it now?

Except, when it does not, and instead displays a dialog

Software Updater: Not all updates can be installed

with a set of rather unintuitive buttons.

What is most disturbing is the list of possible causes, when it’s just a piece of software that checked all kinds of error conditions and should know what went wrong, and should be able to detail the error condition that prevents it from resuming its task, rather than the lazy “An error occurred”.

So I started to track the message down, and found:

  • Software Updater is a Python/GTK application residing in /usr/bin/update-manager
  • The application imports code from the UpdateManager package under /usr/lib/python3/dist-packages/UpdateManager
  • There, the MyCache class in Core/MyCache.py checks for various error conditions, and presents above dialog if something went wrong

It should be easy to adapt the code to display those error conditions. After a bit of trial and error, my version of the MyCache class displayed what kept the Software Updater from updating:

$ ./CheckUpdateManager.py
initializing
checking
would delete nodejs-doc
that's all

After removing the listed package

$ sudo apt-get remove nodejs-doc

Software Updater displayed its usual window of updatable software components.

The script CheckUpdateManager.py is available in my Python repository.