Fixed potential infinite loop

would happen if no upgrades, but a package was no longer needed

Added autoremove to remove said problem packages