This is something I wanted to do for a while on Ubuntu, and I'm not sure if it will work on other distributions. The main problem is that I would remove a program and the man page for it would remain. This gets annoying when I'm searching for stuff and end up double checking on what was removed or decide to try a command I removed. The solution is simple, but takes a few minutes to run. As root, run these commands.
As simple as that and all the old stuff gets removed. This just simply removed the cached manual pages then reconstructs it.
cd /usr/share/man rm -R /var/cache/man mandb
As simple as that and all the old stuff gets removed. This just simply removed the cached manual pages then reconstructs it.