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

dpkg-query -W -f='${Conffiles}\n' | grep obsolete



Hi,

is it true that this call `dpkg-query -W -f='${Conffiles}\n' | grep obsolete` show all obsolate files which can be removed ?

I read about this at http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot while upgrading sysv-rc for dependency booting.

My script to detect obsolate files is:
---8<---8<---8<---8<---8<---8<---8<---8<
#!/bin/sh

tmpf=`tempfile`

trap "rm $tmpf" EXIT QUIT

dpkg-query -W -f='${Conffiles}\n' | grep obsolete | sed -e 's,[[:space:]]\+\([^[:space:]]\+\)[[:space:]]\+\([^[:space:]]\+\).*,\2  \1,g' |md5sum -c 2>/dev/null| grep ": OK$" | sed -e 's,: OK$,,g' >"$tmpf"
vi "$tmpf"
---8<---8<---8<---8<---8<---8<---8<---8<

Greetings,
Raphael

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: