0

I'm trying to run do-release-upgrade to upgrade from 18.04 to 20.04 on an install of Ubuntu Server. When working out what it will install at the beginning of that process, by pressing "d" for details of which packages will be installed/removed etc, it lists a bunch of GUI related packages for Gnome and X. This is a server install that doesn't have any of those packages installed at the moment, and my intent is to keep it that way.

Some packages it wants to install include:

gnome-control-center
gnome-session-common
gnome-menus
gnome-startup-applications
xserver-xorg

And a series of others with similar names.

I believe this means that some package I have installed either currently depends or upgrades into a version that depends on these packages? Is there any way for me to investigate what existing package might be creating that dependency without actually doing the upgrade and installing them all first?

These are the packages output by dpkg -l on my machine: https://pastebin.com/uJ0bL7bF

5
  • From a package list I doubt it would be difficult to pick.. If it's not obvious, a few graphic conversion utilities can use GUI toolkits to perform those functions, which can thus drag in GUI components... but I'd start with what your package list.
    – guiverc
    May 19, 2021 at 23:56
  • 1
    Whatever package is causing that dependency is indeed likely already on your system. Check if those packages are already installed (but unused) on your system. If so, pretend to remove one (using apt's --simulate flag) to discover which of your server applications is also marked for removal. If nothing key to your workflow is removed by the test, then remove that desktop stack (and then fully test your system!) before starting the release-upgrade.
    – user535733
    May 20, 2021 at 2:35
  • I have looked through the package list generated by dpkg -l and not had any luck finding anything that stands out. I've been using apt-cache depends <packagename> to analyze suspects, but that's slow and I have to do it one by one. Is there any way for me to search the tree?
    – Sergeus
    May 20, 2021 at 20:15
  • If I try to remove the packages that are listed to be installed by the do-release-upgrade (such as gnome-control-center) it claims they are not currently installed (I'm using apt-get remove --simulate <packagename>). Which I find confusing - if they're dependencies of something I have installed already I don't know how I could get into my current state with them not yet installed.
    – Sergeus
    May 20, 2021 at 20:21
  • I've edited the question with a pastebin link to the package list generated above, to see if anything stands out. There are a couple of x11 packages in there, but they don't depend on gnome or xorg from what I can see from the apt-cache depends output.
    – Sergeus
    May 20, 2021 at 22:23

1 Answer 1

1

I have found the suspect package that was pulling in all of the GUI dependencies. In the end it was luck and human heuristics, nothing particularly systematic.

I used dpkg -l to list all packages installed on the system. As suggested in the comments of the question, I used apt-get remove --simulate <packagename> to see what removing each of them would do.

After trying many packages with no success, I ended up removing adwaita-icon-theme, which seemed to also take a bunch of gtk libs with it. Then running apt-get autoremove it removed a few other gir1 and gtk related packages. Now do-release-upgrade does seem to want to reinstall adwaita-icon-theme, but gnome and xorg and its ilk are all gone (and the new package count to be installed on upgrade has decreased from 507 to 241).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .