list obsolete and/or locally installed packages in debian/ubuntu
aptitude has a specific list-category to display those when using the curses-GUI, but I do not like it. fortunately, you can use the search-command from the cli-interface with the appropriate search-pattern:
aptitude search "?obsolete" |
or as a shorthand:
aptitude search "~o" |
See the aptitude Reference Guide for more information.