0

So the vast majority of answers around this all seem to land on things like autoremove, etc -- basically finding and removing packages that don't have any dependencies. That's not what I'm after here. ;-)

What I'm trying to figure out is how to identify things that are installed on the system but are never actually USED. My system is somewhat memory/storage constrained so I'd like to lean it out some, but at the same time I'd like a general answer on how this might work.

Is there a way to look across installed packages and find out how often the actual executables/libraries are {run, called, imported, etc.}. If I can run this and find a bunch of stuff that has been installed forever but never actually used, I can remove it (and presumably always just re-add it if I really have to later)...

  • Yes, it's possible, but it's not easy. stat /path/to/filename to determine last access time. dpkg -S /path/to/filename to determine the package the file came from. This is an unwise method of 'cleaning up' your system. It is needlessly laborious, and it may cause breakage and package dependency problems. – user535733 Nov 16 '17 at 21:39
  • Not sure I agree that it's dangerous - if you use the package management software it (shouldn't) let you remove anything that is below it in the dependency tree. I may well be wrong on this, but my intuition is that there are probably a lot of packages that never actually get used by any given user on a given system... – ljwobker Nov 18 '17 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.