aptitude markauto marks packages as automatically installed. By default
aptitude asks for removal of automatically installed packages that have no dependent package installed. So if you run:
sudo aptitude markauto <your long list of packages>
It will ask for confirmation to mark the packages as automatically installed and if some of those packages have no dependent package installed it will ask for confirmation to remove them. Basically the packages
aptitude says will be marked as automatically installed have dependent packages installed and should not be removed, and the packages
aptitude says will be removed have no dependent packages installed and may be safely removed. Obviously you can cancel the command before any change be made by typing Ctrl+C at the confirmation prompt.