You are not logged in.

#1 2004-10-05 01:46:23

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Recursive Intelligence of Pacman "-u" switch?

Whenever I update, I think I've been using the "-u" switch, but maybe haven't all the time, and was just using "pacman -Sy foo" (or "pacman -S foo").  I know the "-u" switch in effect removes then installs, so that leads me to a question...

Question:

If at one time I had "foo-1.0.0" installed, updated to "foo-1.1.0" later with only "pacman -Sy foo", then updated to "foo-1.2.0" using "pacman -Syu foo", would pacman have removed stale files left around from "foo-1.0.0" (since I didn't use the "-u" switch while updating to foo-1.1.0)?

That question is based on the possibility between "foo-1.0.0" and "foo-1.2.0", that the newer package doesn't even use some of those old libraries/exec's from "foo-1.0.0".  I'm also assuming that pacman removes the old files by looking at package files in ".FILELIST" associated with each "foo" package.

I want to keep my system clean as possible, and I have some stuff laying around which shouldn't be there.  It was from either a combination of the lazy nature of my pacman updates as shown above, or from compiling similiar packages from source.

Offline

#2 2004-10-05 03:20:48

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Recursive Intelligence of Pacman "-u" switch?

I'm not certain, but I *think* that when a package is upgraded, whether by -Sy package or -Syu or -U ro -A, it is removed first (equivalent of -Rd).

Judd of course, could give a much more knowledgable answer. Its as if he's intimate with the code. smile

Dusty

Offline

#3 2004-10-05 06:21:46

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Recursive Intelligence of Pacman "-u" switch?

skoal wrote:

If at one time I had "foo-1.0.0" installed, updated to "foo-1.1.0" later with only "pacman -Sy foo", then updated to "foo-1.2.0" using "pacman -Syu foo", would pacman have removed stale files left around from "foo-1.0.0" (since I didn't use the "-u" switch while updating to foo-1.1.0)?

No, every package update is just two operations: remove the old package, install the new package.  The only thing that would be left behind are files designated as config files.  You can see these with pacman -Qii <pkgname>.

So whether you run pacman -Sy foo or pacman -Syu, the package-level operations are the same: remove old, install new.

If there are other stale files lying around, it may be because they were created by the foo program, and as such did not exist in the package beforehand.

Offline

Board footer

Powered by FluxBB