The command deborphan can be used to check for unnecessary
(orphaned) packages.
By default deborphan searches for orphaned libraries, but
you can have it search for other types of packages also: data packages, dev packages, etc. by specifying one of its many --guess-* command
line options.