You are not logged in.

#1 2008-12-20 18:26:18

tony5429
Member
Registered: 2006-03-28
Posts: 1,020

How to Remove a Package that is No Longer Needed in One Step

Just wondering: I know I can do "pacman -Qqtd" to find out what packages I have installed as dependencies but which are no longer needed. I know I can remove those packages with "pacman -Rs." Is there any way to do these two steps together? Like "pacman -Rsqtd?" or "pacman -Rs (pacman -Qqtd)"

Offline

#2 2008-12-20 18:30:38

windtalker
Member
Registered: 2008-03-17
Posts: 220

Re: How to Remove a Package that is No Longer Needed in One Step

pacman -Rsn

The command to truly remove a package, its configuration, and all dependencies which aren't needed anymore.

Offline

#3 2008-12-20 18:34:15

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: How to Remove a Package that is No Longer Needed in One Step

pacman -Rsn $(pacman -Qdtq) will work.

On my system though, it will remove cups and few other packages that I'm rather fond of. Since nothing on my system actually requires cups, it makes reassigning it a little difficult.

Offline

#4 2008-12-20 18:38:24

windtalker
Member
Registered: 2008-03-17
Posts: 220

Re: How to Remove a Package that is No Longer Needed in One Step

Removing cups would definately make my day since my printer is part of my income.
I'm a tattoo artist and a printer does come in handy now and then for printing out a stencil.

Offline

#5 2008-12-20 18:48:25

tony5429
Member
Registered: 2006-03-28
Posts: 1,020

Re: How to Remove a Package that is No Longer Needed in One Step

Thanks, windtalker. I am actually finding that every once in a while a package upgrade will result in a new version of a package which no longer has a dependency that it once had. So I have packages floating around in the system that are no longer needed by anything. I always use "pacman -Syu." I looked at http://www.archlinux.org/pacman/pacman.8.html but I didn't see "-n" in the sync options. Is there a way I can do something like "pacman -Syun" such that any newly unneeded dependencies are removed after the actual upgrade?

Offline

#6 2008-12-20 18:53:59

tony5429
Member
Registered: 2006-03-28
Posts: 1,020

Re: How to Remove a Package that is No Longer Needed in One Step

Thanks, Skottish! I'll just use that actually. pacman is a great package manager.

Offline

#7 2008-12-20 18:54:15

windtalker
Member
Registered: 2008-03-17
Posts: 220

Re: How to Remove a Package that is No Longer Needed in One Step

Everything you always wanted to know but were afraid to ask about pacman can be found at http://wiki.archlinux.org/index.php/Pac … g_Packages

I don't see a -Syun

Offline

#8 2008-12-20 19:00:42

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: How to Remove a Package that is No Longer Needed in One Step

windtalker wrote:

Removing cups would definately make my day since my printer is part of my income.
I'm a tattoo artist and a printer does come in handy now and then for printing out a stencil.

Tattoo artist, huh? Nice. I wish you the best of success.

Offline

Board footer

Powered by FluxBB