'ubuntu-desktop' is a meta package, it can be safely removed.
GNOME Display Manager (gdm) can be reinstalled
Your magic commands may also update ALSA, I presume.
The ALSA hackers tend to recommend this too:
ALSA Upgrade Scripthttp://ubuntuforums.org/showthread.php?p=6589810
QUOTE: "users have reported that packages 'gdm' ..."
this is because of "login sound".
That is why gdm depends on ALSA.