Ubuntu – How to find and back up only files not part of a package

aptdebdpkgpackage-management

How can I find a list of every file that is modified or added outside the debian package management system?

Cruft is unmaintained and doesn't know about the way today's debian package management tools, etc work. For instance, it misses postinst created files and logs that are actually listed as handled by a package and have not been modified since installation date/time.

Best Answer

Cannot understand why you want to backup such files, but you can have such a list with a command like this:

#!/bin/bash
export LC_COLLATE=C
join -v1 <(find / -mount | sort) <(cat /var/lib/dpkg/info/*.list | sort -u)