You are not logged in.

#1 2006-07-15 11:47:26

chrismortimore
Member
From: Edinburgh, UK
Registered: 2006-07-15
Posts: 655

A few questions about pacman

I wouldn't call myself a newbie to Linux (been using it for almost 6 years now), just to Arch Linux.  OK, so Arch Linux and every other Linux behave in basically the same way, but pacman doesn't.

Just now, I am running Gentoo on my two machines.  I have installed Arch Linux on my laptop (on a USB hard drive) to see if I like it, because I've heard good things about it on the Gentoo forums and my laptop doesn't like all that compiling.  But I have some questions:

1.  Debian has "deborphan", Gentoo has "emerge --depclean", but all I can see in Arch to remove dependancies of a program is the recursive switch ("-s" I think).  So, my question:  once I have removed a program, is there an easy way to remove the dependancies that would have been removed with the recursive switch?  Example:  I run "pacman -S xfce4" and pull in everything it wants.  If I then run "pacman -R xfce4", it removes the package (I assume it is just a meta package) and leaves all of xfce4 installed.  Do I have to reinstall "xfce4" and run "pacman -Rs xfce4" or is there an easy way?

2.   What is the difference between "recursive" and "cascade"?  I saw the answer for this somewhere, but can't remember it.

Cheers,

Chris

EDIT: Solved the second one: http://bbs.archlinux.org/viewtopic.php?t=21470


Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB Maxtor DiamondMax 10, 2x320GB WD Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB IBM TravelStar, Nvidia 5200Go 64MB

Offline

#2 2006-07-15 12:15:20

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: A few questions about pacman

pacman -Qe will tell you which packages are "orphans".

As I recall, pacman can't remove them in a single batch operation.

A quick search for "pacman orphan" yields lots of info.

A nice looking script is here: http://bbs.archlinux.org/viewtopic.php?p=170898#170898

Offline

#3 2006-07-15 12:52:37

bogomipz
Member
From: Oslo, Norway
Registered: 2003-11-23
Posts: 169

Re: A few questions about pacman

First, xfce4 is not a package, it's a group which is a separate concept. I'm not even sure it's possible to remove a group, but it could be.

The difference between recursive and cascade is that they do the opposite of each other. While "cascade" removes the packages that can no longer be installed because they depend on something you remove, "recursive" removes packages that no longer needs to be installed because the only reason the were on your system was because of the packages you asked to remove. I always use -Rsc when removing packages to keep unnecessary packages at a minimum. If something I install later needs one of the deps, it will be in pacman's cache anyway. (I now see that you found a thread explaining this, but that wont make me delete this paragraph wink

Often, an easy way to get rid of a collection of packages is to remove a library that is likely to be used by the rest. In the example of xfce, I would do pacman -Rsc libxfce4util which will probably remove all of it. Then I would do pacman -Q|grep xfce to see if anything was missed.


All of your mips are belong to us!!

Offline

#4 2006-07-15 17:21:42

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: A few questions about pacman

It is possible to remove a group - it will first list all the installed members of the group and ask if you want to remove all. If you answer no, you will be asked for each member of the group if you want to remove them.

I almost always remove things with cascade and recursive switches - they are especially handy on big groups like gnome (prevents dependency hell).

Offline

#5 2006-07-15 21:07:06

chrismortimore
Member
From: Edinburgh, UK
Registered: 2006-07-15
Posts: 655

Re: A few questions about pacman

Cool, this all sounds easy enough, seems like it basically comes down to "Don't forget the recursive switch".  I think I'll install Arch Linux properly soon and see how much luck I have smile


Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB Maxtor DiamondMax 10, 2x320GB WD Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB IBM TravelStar, Nvidia 5200Go 64MB

Offline

Board footer

Powered by FluxBB