Is there a usage count for packages or programs?

Solution 1:

If you opt in, popularity-contest reports usage statistics back to Ubuntu, but it could also be used for purposes like yours. From it's man page:

The popularity-contest command gathers information about Debian pack‐ ages installed on the system, and prints the name of the most recently used executable program in that package as well as its last-accessed time (atime) and last-attribute-changed time (ctime) to stdout.

The key word there is executable. So you'll probably get some false hits for data packages, etc.

So, for example, popularity-contest | grep '<OLD>' should give you a list of packages that have not been used for more than three months.

popcon-largest-unused gives you a list of unused package sorted by size.