Tag Archives: cleanup

Cleanup of cruft in Debian

Cleanup of unused, left-over old configuration files

aptitude search '~c'

In aptitude: filter ~c

Cleanup of transitional packages

deborphan

Find manually installed packages

Filter: !~M~i

Find non-maintained files

cruft

Find modified configuration files

https://serverfault.com/questions/90400/how-to-check-for-modified-config-files-on-a-debian-system#90401

dpkg-query -W -f='${Conffiles}\n' '*' | awk 'OFS=" "{print $2,$1}' | LANG=C md5sum -c 2>/dev/null | awk -F': ' '$2 !~ /OK$/{print $1}' | sort | less

debsums -ce

Android backup

Investigation of an Android backup file:

Create a backup file:
adb backup -f `date +%Y%m%d`_backup.ab -apt -obb -all -system

Extract its contents:
dd if=~/android/20161101_backup.ab bs=1 skip=24 | zlib-flate -uncompress > x.tar

Find resource hogs (as root):
find -exec file '{}' ';' | grep "ISO Media" | awk '{ split($0, a, ":"); print a[1] }'

Android apk files are located in /data/app, they can be (temporarily) removed when there is not sufficient space for installing new apps.