You are not logged in.

#1 2024-10-15 10:56:34

Fernando M. Muniz
Member
Registered: 2024-06-27
Posts: 14

Way of making pacman give the choice to remove dependecies?

I initially though this was Konsole's design choice to cancel the command of removing apps when they have dependencies, but it turned out it's pacman's.

I want to know if it is possible to make the pacman give 3 options instead:
0- Do nothing/Cancel.
1- Delete the app(s).
2- Delete the app(s) AND all dependencies.

https://bugs.kde.org/show_bug.cgi?id=494745

Offline

#2 2024-10-15 11:02:53

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,123

Re: Way of making pacman give the choice to remove dependecies?

Offline

#3 2024-10-15 11:04:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,310

Re: Way of making pacman give the choice to remove dependecies?

Can you give a concrete example? If this is on replacement during an update it likely prevents this because you've created a logical conflict you're expected to consciously fix properly.

It smells very much like a XY Problem. These situations should be exceptional and make you think about the packaging relations, which is why it's unlikely to implemented when dealing with conflicts on update.

If you're actually talking about removing things, note: https://wiki.archlinux.org/title/Pacman … g_packages

Offline

#4 2024-10-15 11:10:59

Fernando M. Muniz
Member
Registered: 2024-06-27
Posts: 14

Re: Way of making pacman give the choice to remove dependecies?

V1del wrote:

Can you give a concrete example? If this is on replacement during an update it likely prevents this because you've created a logical conflict you're expected to consciously fix properly.

It smells very much like a XY Problem. These situations should be exceptional and make you think about the packaging relations, which is why it's unlikely to implemented when dealing with conflicts on update.

If you're actually talking about removing things, note: https://wiki.archlinux.org/title/Pacman … g_packages

Sure.
I've ran "sudo pacman -R vlc", then it said it couldn't remove because "phonon-qt6-vlc" required it.
There was no "Do it anyway" or "Remove with its dependencies". It simply ended the command, so I had to start a new one with -Rdd and include the dependency in the command.

Offline

#5 2024-10-15 11:12:32

Fernando M. Muniz
Member
Registered: 2024-06-27
Posts: 14

Re: Way of making pacman give the choice to remove dependecies?

This seems like a very unsafe way of doing it. I'd rather receive a warning first, then asked how I wanted to proceed with it.

Offline

#6 2024-10-15 11:12:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,123

Re: Way of making pacman give the choice to remove dependecies?

You broke things on your system doing that. Things have dependencies for a reason, using Rdd just because is a terrible idea.

Offline

#7 2024-10-15 11:20:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,310

Re: Way of making pacman give the choice to remove dependecies?

You get a list of all packages affected by doing a dependency removal with -s or -c before the operation is executed. with just -R you explicitly say you want to remove a package and it correctly bails once that is not possible because it would affect dependencies.

Offline

#8 2024-10-15 11:25:12

Fernando M. Muniz
Member
Registered: 2024-06-27
Posts: 14

Re: Way of making pacman give the choice to remove dependecies?

V1del wrote:

You get a list of all packages affected by doing a dependency removal with -s or -c before the operation is executed. with just -R you explicitly say you want to remove a package and it correctly bails once that is not possible because it would affect dependencies.

I still don't get why they are separate, but ok.

Offline

#9 2024-10-15 11:28:55

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,123

Re: Way of making pacman give the choice to remove dependecies?

They are separate because you're supposed to understand what the options you're using mean and how they can affect your system, not just pick a random option.

Offline

#10 2024-10-15 11:46:52

Fernando M. Muniz
Member
Registered: 2024-06-27
Posts: 14

Re: Way of making pacman give the choice to remove dependecies?

Scimmia wrote:

They are separate because you're supposed to understand what the options you're using mean and how they can affect your system, not just pick a random option.

This will go nowhere. I'm satisfied with the responses even though I don't understand with this approach over something that could be intuitive while not affecting veteran arch users (or I fail to see how it would).

Offline

#11 2024-10-15 13:15:31

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

Re: Way of making pacman give the choice to remove dependecies?

Your intuition is your own.  What you're describing as intuitive I would see as precisely the opposite.  It is quite intuitive to me that if you want to remove a package and everything that depends on it, then you'd need an additional flag beyond the command that would just remove a package.

Also note that there is a huge different between A) removing a package and all of its (now unneeded) dependencies, vs B) removing a package and all of the packages that depend on it.  The former is a very common goal - in fact this really should be the default way of removing any package.  The second option is what you are looking for - and while pacman can do that for you, you really should not need to do that except in very rare and specific circumstances.

So yes, pacman doesn't make it easy to do dangerous and unwise things.

Last edited by Trilby (2024-10-15 13:17:32)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB