[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why can I not uninstall this package?



On 2021-11-19 at 13:27, Tim Woodall wrote:

> I have an old eeepc that I've just upgraded to bullseye. It was getting
> very limited on diskspace so I've been going through removing packages
> that I no longer require or in some cases, appear to be very old
> versions that have been left lying around.
> 
> I've now got things under control. However I've hit the following weird
> case that I don't understand:
> 
> eeepc:/var/lib/dpkg/info# apt-get remove libjbig0
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> 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:
>   libreoffice-base-core : Depends: libreoffice-core-nogui (= 1:7.0.4-4+deb11u1) but it is not going to be installed or
>                                    libreoffice-core (= 1:7.0.4-4+deb11u1) but it is not going to be installed
>   python3-uno : Depends: libreoffice-core-nogui (= 1:7.0.4-4+deb11u1) but it is not going to be installed or
>                          libreoffice-core (= 1:7.0.4-4+deb11u1) but it is not going to be installed
> E: Error, pkgProblemResolver::Resolve generated breaks, this may be
> caused by held packages.

The way to track down a problem like this is to start by adding the
specified "is not going to be installed" packages to the install command
line, with the exact specified versions, and repeat the command.

You'll either get a specific message explaining *why* the "is not going
to be installed" happened, or get more packages listed for "is not going
to be installed". If the latter, rinse and repeat. If the former, the
"why" message will probably help you figure out what needs to be done.

In this case, since you're starting out with a "remove" command rather
than an "install" command, you're going to want to reverse it for
simplicity's sake. That means the second command in the cycle will be
something like (a non-linewrapped version of):

# apt-get install libjbig0- libreoffice-core-nogui=1:7.0.4-4+deb11u1
libreoffice-core=1:7.0.4-4+deb11u1

The trailing '-' on the package name turns the install action into a
remove action for that specific package. You can also use a trailing '+'
to do the reverse, but as in this case you're going to be specifying
more install actions than remove actions, it makes more sense to do it
this way around.


You'll probably also want to make note of your manually-installed
package list before getting started, since this process will wind up
marking the packages you name as manually installed.

The manually-installed package list can be gotten by running

$ apt-mark showmanual

and if you redirect that into a file you'll have a copy for later reference.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: