You are not logged in.

#1 2012-10-12 18:10:41

quayasil
Member
Registered: 2008-11-09
Posts: 102

Pacman: clean-up or de-fragmentation?

I have three ThinkPads (notebooks) with exactly the same set of packages installed (the same output of `pacman -Q'). Unfortunately: outputs of `pacman -Qe' are completely different. I wonder what's the best way to find the minimal set of packages that have to be installed explicitly given a list of packages and what is the best way to rebuild pacman database when it's determined.

Last edited by quayasil (2012-10-12 18:12:02)

Offline

#2 2012-10-12 18:43:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Pacman: clean-up or de-fragmentation?

Moving to Pacman and Package Upgrades...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2012-10-12 18:46:07

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Pacman: clean-up or de-fragmentation?

What happens if you run pacman -Qet?  As I understand it, the -t flag will filter out any packages which are dependencies of any installed packages.  That might help even things out a bit.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2012-10-13 10:06:19

quayasil
Member
Registered: 2008-11-09
Posts: 102

Re: Pacman: clean-up or de-fragmentation?

Yes. And not. How about packages installed by package groups?

Offline

#5 2012-10-13 13:18:56

abstracity
Member
From: Houston, USA
Registered: 2007-08-08
Posts: 83

Re: Pacman: clean-up or de-fragmentation?

alphaniner wrote:

What happens if you run pacman -Qet?  As I understand it, the -t flag will filter out any packages which are dependencies of any installed packages.  That might help even things out a bit.

pacman -Qt and pacman -Qdt also filter out dependencies. pacman -Qet filters out dependencies of explicitly installed packages.

Last edited by abstracity (2012-10-13 13:19:08)


Without error there can be no brilliancy. ― Emanuel Lasker

Offline

#6 2012-10-15 16:03:02

Pres
Member
Registered: 2011-09-12
Posts: 423

Re: Pacman: clean-up or de-fragmentation?

Something like this will probably accomplish what you want:

diff <(pacman -Q) <(pacman -Qt) | grep "<" | awk '{print $2}' | pacman -S --asdep -

NOTE: I haven't tested this. It's only a proof of concept, so make sure you know what it is doing and use it at your own risk.

The idea is to find packages that are required by other packages and reinstall those using the --asdep flag to mark them as dependencies instead of explicitly installed packages. It will fail if you have any AUR packages installed, so probably needs to be adjusted.

Offline

Board footer

Powered by FluxBB