Re: how to tell what packages are unused on a debian server?

Andrew McGlashan <andrew.mcglashan@xxxxxxxxxxxxxxxxxxxxx> wrote:
Okay, I tried the change and let it finish the report.

I found all "in use", except for php5, but there is a bunch of php5
stuff that is in use.

Arrgghh. You're now making me /think/ about the script, rather than it
being a throwaway suggestion(!) Upon further investigation, the atime
for a symbolic link is (inevitably) updated when it's deferenced, so
you need to skip those, too.

The find statement thus becomes
find $(readlink -f "$F") -atime -180

On my laptop it's tricky for me to test this as I mount everything
noatime. On a couple of servers I've got, though, the results feel
approximately correct.

If you're finding that everything is "in use" then at this stage it's
probable that you've made a filesystem backup with tar or cpio, which
obviously reads every single file, unfortunately making atime useless.

Good luck!

To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx