#712957 --print-uris autoclean should print file paths

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Date:
2013-08-03 12:15:18 UTC
Severity:
normal
#712957#5
Date:
2013-06-21 08:56:46 UTC
From:
To:
Aptitude -s autoclean does not reveal the full details of the files it
plans to delete.

Only it knows the exact names.

If one wants to post process that list, say to only remove files older
than a week, one must cross ones fingers that one has guessed the right
file that Aptitude was thinking about, because the full suffix is not
revealed by Aptitude.

$ aptitude -s autoclean > /tmp/e
$ perl -nawle 'next unless $F[0] eq "Del"; print "echo ===== $_; ls $F[1]_$F[2]*"' /tmp/e|sh
===== Del gvfs-libs 1.16.2-2+b1 [279 kB]
gvfs-libs_1.16.2-2+b1_i386.deb
===== Del libglib2.0-data 2.36.3-1 [1,845 kB]
libglib2.0-data_2.36.3-1_all.deb
===== Del gvfs 1.16.2-2+b1 [281 kB]
gvfs_1.16.2-2+b1_i386.deb
===== Del xfce4-settings 4.10.1-1 [673 kB]
xfce4-settings_4.10.1-1_i386.deb
===== Del gvfs-daemons 1.16.2-2+b1 [300 kB]
gvfs-daemons_1.16.2-2+b1_i386.deb
===== Del libglib2.0-0 2.36.3-1 [2,035 kB]
libglib2.0-0_2.36.3-1_i386.deb
===== Del gvfs-common 1.16.2-2 [672 kB]
gvfs-common_1.16.2-2_all.deb
===== Del qtchooser 31-g980c64c-3 [17.8 kB]
qtchooser_31-g980c64c-3_i386.deb

#712957#10
Date:
2013-08-02 19:33:23 UTC
From:
To:
$ apt-get -s autoclean
Del google-earth-stable current [45.5 MB]

Do you mean
google-earth-stable_current_amd64.deb
or
google-earth-stable_current_i386.deb
or both ?!?!

And there is no verbosity option to make it clear for people wishing to
produce a precise list with no room for blunders.

#712957#21
Date:
2013-08-03 11:02:18 UTC
From:
To:
retitle 712957 --print-uris autoclean should print file paths
thanks
Ah ha, the perfect use for --print-uris when combined with autoclean:
print the file paths!
(I suppose in this case no --just-print is needed.)
It is up to you if you want to make them relative to
/var/cache/apt/archives or print the entire path.