1

I've come across a puzzling problem after upgrading Linux Mint from version 21.3 to 22. This is a HUGE upgrade, that probably updates every single package on the system. The upgrade went well and took a long time, of course. Afterwards I found maybe 15-20 packages that were 'orphaned', meaning that no other installed package depend on them. The can normally be removed without any problem, if they are libraries for example. So I did that as I normally do. But I'm stuck with 3 of these orphaned packages, that can't be removed without causing problems. One such package is:

gir1.2-freedesktop

If I try to uninstall this package, I get the following error:

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: mintsources : Depends: mint-common (>= 2) but it is not going to be installed Depends: gir1.2-gtk-3.0 but it is not going to be installed Depends: gir1.2-pango-1.0 but it is not going to be installed Depends: gir1.2-vte-2.91 but it is not going to be installed Depends: gir1.2-xapp-1.0 but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. 

After investigating I find, that the 'orphaned' package gir1.2-freedesktop contains a number of 'virtual' packages. And other packages in the system depend on them, for example mintsources. I should mention that the commands

  • apt-get check (Checks the system for unmet dependencies)
  • apt install -f (Attempts to fix unmet dependencies by installing missing packages)

Do not generate any suggestions, everything seems dandy. So the package systems 'seems' to be ok. Using the more thorough aptitude tool doesn't help. If I do a

aptitude purge gir1.2-freedesktop 

it simply shows me the dependencies of all the before mentioned virtual packages and suggest, that I should NOT remove gir1.2-freedesktop. Which I haven't of course.
So, how can this gir1.2-freedesktop package be marked as 'orphaned', when other packages clearly depend on its content?
This suggest, that the package database is somehow not in a well-defined state. I've tried reinstalling gir1.2-freedesktop and mintsources with

apt install --reinstall mintsources 

but to no avail.
Has anyone got an idea about, how to clean this mess up?
My system is working fine, but this situation puzzles me...

2
  • How are you determining that the package is orphaned?CommentedAug 2, 2024 at 8:58
  • If I run the command: deborphan I get the output: gir1.2-freedesktopCommentedAug 2, 2024 at 9:00

1 Answer 1

0

deborphan doesn’t take virtual dependencies (“Provides”) into account; this is a known limitation. (The bug is marked as fixed, but that’s because deborphan has been removed from Debian.)

Your system and its package database are fine.

In general nowadays unnecessary packages are identified using apt autoremove, but that relies on having automatically-installed packages correctly identified.

2
  • Thanks Stephen! That was a very precise and useful answer I was simply not aware of these two facts: That deborphan doesn’t take virtual dependencies, and that it has been put out to pasture... So I guess that we at the moment simply have a replacement for 'deborphan', that can give an authoritative list of packages on which no other packages depend?CommentedAug 2, 2024 at 11:13
  • If automatically-installed packages are correctly marked, apt can figure out which packaged are orphaned. Most packages should already be marked appropriately; the best tool to review and fix this is aptitude.CommentedAug 2, 2024 at 17:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.