You are not logged in.

#1 2009-01-10 10:43:34

kaola_linux
Member
From: Bacolod City/Philippines
Registered: 2008-09-23
Posts: 513

How to know and remove unused applications via pacman?[SOLVED]

Hello, I would like to know how to remove them...I mean those packages included [unused anymore] during installation of a specific app...I'm saving space for I only have an 8gb SSD on my Acer Aspire One...My cache are already empty [pkg]...:)


Thanks in advance

Last edited by kaola_linux (2009-01-10 14:18:41)


Netbook (Acer Aspire One 110 || 160gb SATA HD || 1.5gb ram): archlinux i686 / KDEmod 4.3
Registered Linux User # 481212 / Machine Registration # 390468
"In a world without walls and fences, who needs windows and gates?"

Offline

#2 2009-01-10 10:57:15

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,699
Website

Re: How to know and remove unused applications via pacman?[SOLVED]

What do you mean "included during installation of a specific app"? The only packages installed with a target package are those packages which it depends on, so you can't remove them if you want the target package to still work. To remove packages that you don't want anymore, use "pacman -Rsn <pkg name>". That will remove the package and it's dependencies.

To see which packages are "orphans", i.e. installed as dependencies for packages that are no longer installed, use "pacman -Qdt". You can remove all of those with "pacman -Rsn $(pacman -Qqdt)".

Take a look at the pacman man page too: "man pacman"


EDIT

I just saw your post here where you state that you've been making packages with

makepkg -s

Now I understand what you want to remove and why. The "pacman -Rsn $(pacman -Qqdt)" command will do this.

In general though, you should take the time to learn about the utilities that you're using. From the makepkg man page:

       -r, --rmdeps
       Upon successful build, remove any dependencies installed by makepkg
       during dependency auto-resolution (using -b or -s).

       -s, --syncdeps
       Install missing dependencies using pacman. When build-time or
       run-time dependencies are not found, pacman will try to resolve
       them. If successful, the missing packages will be downloaded and
       installed.

Instead of using "makepkg -s", you should use "makepkg -s -r" to remove makedepends automatically when you're done.

Last edited by Xyne (2009-01-10 13:32:00)

Offline

#3 2009-01-10 13:41:46

kaola_linux
Member
From: Bacolod City/Philippines
Registered: 2008-09-23
Posts: 513

Re: How to know and remove unused applications via pacman?[SOLVED]

Thanks alot...very well said..

When I uninstall a package I only use pacman -R packgename hence I may not always know its dependencies that my system doesn't use anymore...I'll try what you've said...Thanks alot..:) Xyne...

Just did what you've said...I don't know I'm wasting this space for nothing...:o

[koala@myhost kicad]$ sudo pacman -Rsn $(pacman -Qqdt)
Password: 
checking dependencies...

Remove (38): xulrunner-1.9.0.5-2  hunspell-1.2.8-1  xine-lib-1.1.15-4  
             libxvmc-1.0.4-1  unzip-5.52-4  t1lib-5.1.2-2  portmap-6.0-2  
             libxklavier-3.8-1  libmpd-0.16.1-1  libidn-1.11-1  
             lesstif-0.95.0-3  libxp-1.0.0-2  printproto-1.0.4-1  
             gnome-panel-2.24.2-2  policykit-gnome-0.9.2-2  
             libgweather-2.24.2-1  gnome-menus-2.24.2-1  
             gnome-desktop-2.24.2-1  libgnomeui-2.24.0-1  libbonoboui-2.24.0-1  
             libgnomecanvas-2.20.1.1-2  libart-lgpl-2.3.20-1  
             evolution-data-server-2.24.2-2  libgnome-2.24.1-1  
             libbonobo-2.24.0-1  db4.1-4.1.25-2  gnome-icon-theme-2.24.0-1  
             icon-naming-utils-0.8.7-1  perl-xml-simple-2.18-2  git-1.6.1-1  
             perl-error-0.17011-1  giblib-1.2.4-3  freealut-1.1.0-2  
             openal-0.0.8-4  dhcdbd-3.0-1  consolekit-0.3.0-3  a2ps-4.13c-1  
             psutils-1.17-1  

Total Removed Size:   265.00 MB

Once again, thank you...Arch forums didn't fail me once again!!!:D cheers

Last edited by kaola_linux (2009-01-10 14:05:45)


Netbook (Acer Aspire One 110 || 160gb SATA HD || 1.5gb ram): archlinux i686 / KDEmod 4.3
Registered Linux User # 481212 / Machine Registration # 390468
"In a world without walls and fences, who needs windows and gates?"

Offline

#4 2009-01-10 13:58:37

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,699
Website

Re: How to know and remove unused applications via pacman?[SOLVED]

np

You should always use "pacman -Rs" to remove unneeded dependencies along with the package. Although I don't fully understand what "n" does in "pacman -Rsn", it supposedly gets rid of some other files associated with the package. I avoid clutter when I can, so I always use it.

Offline

#5 2013-03-22 16:01:14

rksomayaji
Member
Registered: 2013-03-22
Posts: 1

Re: How to know and remove unused applications via pacman?[SOLVED]

pacman -Rsn removes the configuration files which are saved usually as ".pacsave"

Offline

#6 2013-03-26 21:54:06

Raptorista
Member
From: Italy
Registered: 2011-08-01
Posts: 42

Re: How to know and remove unused applications via pacman?[SOLVED]

@Xyne: I'm a bit puzzled with the command you suggested [pacman -Qdt] as on my system it doesn't seem to list only orphan packages.
For instance, in the list it returns I can find packages like vlc, virtuoso, udisks, php, gksu, cups... Which I don't want to get rid of.
Is this correct or my system is messed up? XD

I checked man pacman and it agrees with you on the usage of pacman -Qdt, so probably I'm not fully getting what you are saying...

Offline

#7 2013-03-26 22:32:25

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,377

Re: How to know and remove unused applications via pacman?[SOLVED]

'pacman -Qdt' shows packages that are not currently required by any other package, but were not explicitly installed. You can check this by using 'pacman -Si <package>' to show details about specific packages. If you feel that these packages should be listed as explicitly installed, use 'pacman -D --asexplicit <package>' to mark them as such. Details are in the pacman manpage.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Offline

#8 2013-03-26 22:48:30

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: How to know and remove unused applications via pacman?[SOLVED]

If you use "pacman -Qi <package>" instead it will actually tell you about whether or not it is explicitly installed.  Q is for querying the locally installed packages, and S is for syncing information from the repositories.

Offline

#9 2013-03-26 23:41:26

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,377

Re: How to know and remove unused applications via pacman?[SOLVED]

Bah, rebellious fingers. Well spotted, Woofy, I meant -Qi.

-Si shows information about remote packages though, it doesn't actually sync anything. It's useful for checking dependencies/conflicts of packages you're thinking of installing.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Offline

Board footer

Powered by FluxBB