You are not logged in.

#1 2009-08-22 18:13:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

find all packages that are in cache but not installed? [solved]

Is this possible?  Basically, I copied over my /var/cache/pacman/pkg from another machine to a fresh install to save re-downloading 1+ gigs of packages.  Can pacman compare the installed packages to those in cache so I can see what I forget to install on the new machine (I got most of them)!

Last edited by graysky (2009-08-23 09:43:41)

Offline

#2 2009-08-22 19:21:28

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: find all packages that are in cache but not installed? [solved]

The answer to your question is probably something along the lines of:

for pkg in /var/cache/pacman/pkg/*$(uname -m).pkg.tar.gz; do [[ -e /var/lib/pacman/local/$(basename ${pkg%-*}) ]] || echo $(basename $pkg); done

However, I'd suggest another approach. Create a list of explicitly installed packages on both systems and compare them.

To generate a list of explicitly installed packages you can use (on each machine):

pacman -Qeq >packages

And then you can easily compare the two lists with:

diff -up packages1 packages2

Offline

#3 2009-08-23 09:43:28

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: find all packages that are in cache but not installed? [solved]

Thanks very much!

Offline

Board footer

Powered by FluxBB