You are not logged in.

#1 2022-06-08 18:43:17

pradtf
Member
Registered: 2009-06-10
Posts: 134

SOLVED proper way to remove package and deal those that depend upon it

i wanted to remove polkit, so i start with:

                                                           22-06-08 11:16AM
schnell% paru -Rs polkit
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing polkit breaks dependency 'polkit' required by colord
:: removing polkit breaks dependency 'polkit' required by power-profiles-daemon

Ok so now we do:

  
schnell% paru -Rs polkit colord power-profiles-daemon
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing colord breaks dependency 'colord' required by colord-gtk-common

Fine!! so we go for colord ...
which gives more breaking package and more and eventually we get to:

schnell% paru -Rs polkit colord power-profiles-daemon colord-gtk-common colord-gtk

according to this article:
How to Remove a Package and Its Dependencies with Pacman on Arch Linux

i can see the dependency tree using
pactree ITM

and i can do
pacman -Rcns ITM
to remove ITM's dependencies.

also (from the article),
pacman -Qdtq
just shows me packages that don't depend on anything.

however, all this just deals with ITM's dependencies NOT packages that depend on ITM.

what is the best approach to removing ITM when there are packages that depend on ITM?

(my guess is it can't be done other than the way i did chasing down everything that would break, because you could do a lot of damage unknowingly ... but i don't know, so i ask).

Last edited by pradtf (2022-06-08 19:15:59)


in friendship,
prad

Offline

#2 2022-06-08 19:00:35

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: SOLVED proper way to remove package and deal those that depend upon it

Offline

#3 2022-06-08 19:03:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: SOLVED proper way to remove package and deal those that depend upon it

pradtf wrote:

pactree ITM ... however, all this just deals with ITM's dependencies NOT packages that depend on ITM.

Read `man pactree` or `pactree --help` - it can do this as well.

pradtf wrote:

what is the best approach to removing ITM when there are packages that depend on ITM?

You can't.  Or more precisely you really really shouldn't.  While there is a way to force it, it is burried in a obscure, secure, hidden place that you're unlikely to ever see: your package manager's man page.

But again, you really shouldn't.  It's a dependency for a reason.  By all means use the options you discover for pactree to figure out what top-level package (transiently) requires ITM or whatever package as a dependency, then if you are okay without that top-level package then remove it and all it's dependencies and ITM will be gone.  Otherwise, deal with it.

Last edited by Trilby (2022-06-08 19:04:14)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2022-06-08 19:15:43

pradtf
Member
Registered: 2009-06-10
Posts: 134

Re: SOLVED proper way to remove package and deal those that depend upon it

understood!
thx tucuxi and trilby.

so, we have

To remove a package, its dependencies and all the packages that depend on the target package:
pacman -Rsc ITM

To remove a package, which is required by another package, without removing the dependent package:
pacman -Rdd ITM
though this one leaves dependent packages and so can break the system.
it must be the one "burried in a obscure, secure, hidden place"
and is on the avoid pacman command list!

now i'm ready to "deal with it"! big_smile


in friendship,
prad

Offline

#5 2022-06-08 19:42:50

dogknowsnx
Member
Registered: 2021-04-12
Posts: 648

Re: SOLVED proper way to remove package and deal those that depend upon it

In case you need more information on polkit and whether to remove it or not:
http://smcv.pseudorandom.co.uk/2015/why_polkit/


Notifications for Arch Linux package updates
RI - Rest your Eyes and Self

"We are eternal, all this pain is an illusion" - Maynard James Keenan

Offline

#6 2022-06-08 21:28:11

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: SOLVED proper way to remove package and deal those that depend upon it

dogknowsnx wrote:

In case you need more information on polkit and whether to remove it or not:
http://smcv.pseudorandom.co.uk/2015/why_polkit/

And my answer is "yes remove it, kill it with fire, and anything that depends on it".


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB