You are not logged in.

#1 2011-10-22 21:56:55

sensei
Member
Registered: 2011-10-14
Posts: 35

[SOLVED] Question regarding pacman and removing packages.

Hello!

Let's say you install kde with the command below.

pacman -S kde

Pacman will then installl dependencies and other included packages. My question is: if you remove kde, will the packages that were installed alongside kde be removed too? If not, how do you do it?
Is it even possible to remove kde? Since it doesn't seem to be a real package, but rather a group of packages, will Pacman throw an error?
I took a quick look at the manual but didn't really find anything that answers my question.

Thanks in advance.

Last edited by sensei (2011-10-22 22:13:43)

Offline

#2 2011-10-22 22:08:01

SidK
Member
Registered: 2011-03-03
Posts: 116

Re: [SOLVED] Question regarding pacman and removing packages.

pacman -R

Will remove that package only.

pacman -Rs

Will remove that package and all packages it depended on that are also not needed by other packages installed.
If you want to remove packages that were installed as dependencies and are now unrequired (say you removed kde as you wrote which would have left left it dependencies in place), then run:

pacman -Rs `pacman -Qdt | awk '{print $1}' | tr '\n' ' '`

Is it even possible to remove kde? Since it doesn't seem to be a real package, but rather a group of packages, will Pacman throw an error?

This one I don't know. Why don't you try it and find out?

Offline

#3 2011-10-22 22:12:43

sensei
Member
Registered: 2011-10-14
Posts: 35

Re: [SOLVED] Question regarding pacman and removing packages.

Thanks for answering, SidK!

SidK wrote:

This one I don't know. Why don't you try it and find out?

Certainly, when I've installed KDE. I hesitated to install it since I didn't want to leave a bunch of unnecessary packages in my system if I don't like KDE or if I feel to uninstall it. I'll post the results later.

Offline

#4 2011-10-22 22:19:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Question regarding pacman and removing packages.

Instead of

pacman -Rs `pacman -Qdt | awk '{print $1}' | tr '\n' ' '`

just use

pacman -Qqdt | pacman -Rs -

Yes, it's possible to remove kde or parts of it.

Offline

#5 2011-10-23 12:16:05

Radioactiveman
Member
From: Germany
Registered: 2010-05-13
Posts: 388

Re: [SOLVED] Question regarding pacman and removing packages.

# pacman -Rs $(pacman -Qdtq)

is another option which does the same smile

Offline

Board footer

Powered by FluxBB