There are two solutions, and both can be used. 1) Remove the already installed packages comparing both lists using diff or any other method to compare files. 2) Using aptitude/dselect and mark all packages to install and append the auto-installed flag, then check which packages will be "automatically removed" and there you have your list of the top of dependencies. There is a tool that can generate software dependencies graph, but I don't remember the name or that it would be useful for this particular case. —
Braiam 43 secs ago