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

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

Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> 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!

Reply to: