You are not logged in.

#1 2010-08-17 13:14:18

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

[Solved] Removing software

Hello all,

Lately I've been installing some software to test new applications. I deleted the ones I don't want, but ofcourse they've left quite some dependencies on my system, out of which some I don't even need. Coming from an Ubuntu install, I know that in Ubuntu I've got the command

sudo apt-get autoremove

to automatically remove unneeded libs etc. I wonder if Arch Linux has a similar feature? I've tried the man page, but other than

-u, --unneeded
           Removes the targets that are not required by any other packages.
           This is mostly useful when removing a group without using the -c
           option, to avoid breaking any dependencies.

I didn't find anything.

Last edited by Unia (2010-08-17 13:25:02)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#2 2010-08-17 13:17:28

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: [Solved] Removing software

Check under the "Remove" the "-c" "-n" and the "-s".

REMOVE OPTIONS
       -c, --cascade
           Remove all target packages, as well as all packages that depend on one or more target packages. This
           operation is recursive, and must be used with care since it can remove many potentially needed
           packages.

       -k, --dbonly
           Removes the database entry only. Leaves all files in place.

       -n, --nosave
           Instructs pacman to ignore file backup designations. Normally, when a file is removed from the system
           the database is checked to see if the file should be renamed with a ".pacsave" extension.

       -s, --recursive
           Remove each target specified including all of their dependencies, provided that (A) they are not
           required by other packages; and (B) they were not explicitly installed by the user. This operation is
           recursive and analogous to a backwards --sync operation, and helps keep a clean system without orphans.
           If you want to omit condition (B), pass this option twice.

So, pacman -Rcn for "autoremove" equivalnt, and -Rcns for a more thorough removal, which will remove deps that could stay as orphans

Last edited by flamelab (2010-08-17 13:20:57)

Offline

#3 2010-08-17 13:17:47

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

Re: [Solved] Removing software

> but ofcourse they've left quite some dependencies on my system
'pacman -Rs' should take care of dependencies. '-Rns' to remove configs too. '-Sc / -Scc' to clean the cache.

Offline

#4 2010-08-17 13:18:23

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [Solved] Removing software

man pacman wrote:

       -s, --recursive
           Remove each target specified including all of their dependencies, provided that (A) they are not required by other packages; and (B) they were not explicitly installed
           by  the user. This operation is recursive and analogous to a backwards --sync operation, and helps keep a clean system without orphans. If you want to omit condition
           (B), pass this option twice.

edit: late late late

Last edited by hokasch (2010-08-17 13:22:17)

Offline

#5 2010-08-17 13:20:57

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [Solved] Removing software

Wow, you guys are fast!
I thought the -s option only accounts if you are actually removing the application, as in pacman -Rs obmenu. Note that I have already deleted the apps, but later thought about their dependencies.

Last edited by Unia (2010-08-17 13:22:30)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#6 2010-08-17 13:21:00

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [Solved] Removing software

You should check out the pacman man page.

/edit: Took me too long to write my post... Might as well make it useful now...

# remove any dependency packages which are no longer needed
pacman -Rs $(pacman -Qtdq)

Last edited by brisbin33 (2010-08-17 13:25:21)

Offline

#7 2010-08-17 13:23:08

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: [Solved] Removing software

If you have already removed stuff without using "-Rs", look at "pacman -Qqtd" to get a list of unneeded dependecies to remove.

Offline

#8 2010-08-17 13:24:41

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [Solved] Removing software

Allan wrote:

If you have already removed stuff without using "-Rs", look at "pacman -Qqtd" to get a list of unneeded dependecies to remove.

Thanks, that's what I was looking for smile


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#9 2010-08-25 23:58:26

archman-cro
Member
From: Croatia
Registered: 2010-04-04
Posts: 943
Website

Re: [Solved] Removing software

Is 'pacman -Qdt' really safe? Cause I get libxxf86misc in the list, and it was installed when I was doing a fresh Arch install. Also, when I remove that, I could remove 'xf86miscproto', cause it'll become an orphan too. My question is not really good, but I mean, isn't there an app which will need that package? Yes, I've already ran into problems while listening to 'pacman -Qdt'. Removed polkit and consolekit which appeared in the list. Almost broke the system. big_smile

Offline

Board footer

Powered by FluxBB