You are not logged in.

#1 2012-04-04 16:07:48

grantmcduling
Member
Registered: 2012-02-23
Posts: 56

(SOLVED) Clearing out unused packages or dependencies

I have been initialling a few packages that I need, and wondered if there is a simple way to ensure my system remains as lean and efficient as possible by not becoming cluttered with broken, unwanted or no longer needed dependencies or packages. For instance, with Debian OSs I used sudo apt-get autoremove, and sudo pate-get autoclean.

I ran #pacman -Qdt and found that I have lib fetch 2.33-3 and swig 2.0.4-3 that apparently are now longer needed. Is the best way to remove them by using #pacman -Rs (package name)? Or is there a simpler way?

Last edited by grantmcduling (2012-04-09 23:23:31)

Offline

#2 2012-04-05 04:57:24

pablokal
Administrator
From: Nijmegen, Holland
Registered: 2010-10-12
Posts: 3,630
Website

Re: (SOLVED) Clearing out unused packages or dependencies

To list all packages no longer required as dependencies (orphans):

$ pacman -Qdt

indeed, you arehalfway there;
and
pacman saves important configuration files when removing certain applications and names them with the extension: .pacsave. To prevent the creation of these backup files use the -n option:

# pacman -Rn package_name

or to be save and remove all dependencies:

# pacman -Rns package_name

Getting your questions answered here at ArchBang Forums
Please! Always give hardware info, if there is a chance that 's relevant: #lspci -vnn
On Arch(bang) and Openbox: http://stillstup.blogspot.com/

Offline

#3 2012-04-05 06:04:37

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,906

Re: (SOLVED) Clearing out unused packages or dependencies

sudo pacman -Rns $(pacman -Qqtd)

Found on Archbang forum, simply added it as an alias in .bashrc


Comments, suggestions, donations please feel free to contact me mrgreen(at)archbang(dot)org Artix information https://artixlinux.org/migrate.php

Offline

#4 2012-04-09 23:23:05

grantmcduling
Member
Registered: 2012-02-23
Posts: 56

Re: (SOLVED) Clearing out unused packages or dependencies

Thanks. Worked beautifully. This is one for the books. I've made a note of it and use it regularly.

Offline

Board footer

Powered by FluxBB