[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Automatic removing of unneeded .deb files?

Eric Cooper wrote:
>     #!/bin/bash
>     for deb in /var/cache/apt/archives/*.deb; do
> pkg=$(dpkg-deb -f $deb Package)
> if ! dpkg-query -Wf '${Status}' $pkg | grep -q ' installed'; then
> echo $pkg: not installed
> # uncomment this to remove it ...
> # rm $deb
> fi

Thanks. There is now wish for this in BTS (bug# 340444).


Matej Cepl, http://www.ceplovi.cz/matej/blog/
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
His mother should have thrown him away and kept the stork.
      -- Mae West

Reply to: