I've updated my find duplicates script to work with the .xz packages. There are
actually 2 scripts involved:
'fduparch.sh' is the wrapper script that just sets the directories and options
for the actual duplicate finding script 'fduppkg'.
In its current configuration fduparch.sh actually calls fduppkg twice.
it calls fduppkg to scan /var/cache/pacman/pkg and move any duplicates found to
'/home/backup/pkg-old'. Packages with the same name are then checked by DATE and
any older packages are moved /home/backup/pkg-old. This leaves only the current
packages in /var/cache/pacman/pkg making it much easing to move your install
from machine-to-machine without copying unneeded duplicates. Second, it frees up
space on / by moving duplicates to the /home partition.
it calls fduppkg a second time to scan '/home/backup/pkg-old' and move any
duplicates found to '/home/backup/pkg-older'.
That way you have the latest packages in the normal '/var/cache/pacman/pkg' and
you have a duplicate-free set of the last packages before update in
'/home/backup/pkg-old'. All older versions are kept in '/home/backup/pkg-older'
The way I use the scripts is to create softlinks to the scripts in
/usr/local/bin (making sure /usr/local/bin is in your PATH) as follows:
Searches <search dir> for duplicate pkgs and moves duplicate files to [dup_dir]
or <search dir>/duplicates by default.
-d | --dupdir Used to specify directory to hold duplicate rpms
-l | --logfile Specify the log file name (default ./duplicates.log)
-s | --silent Don't output anything to stdout, just log results
-v | --verbose Output information showing which files are kept and not moved
However, to change the default duplicate directories, just edit the wrapper
script 'fduparch' and set the directories you want there. I have used a wrapper
script to keep fduppkg as flexible as possible so I can simply run it on any
package directory to find and move duplicates. (the split setup was originally
developed to handle suse's archane cache directory structure, but it handles
Arch's simple setup as well)