OS: Linux Mint 18.3 Cinnamon 64-bit.
I almost got a heart attack, after reboot preceding this; in an important VM:
sudo apt-get install lightdm
... I chose LightDM as the default DM ...
sudo apt-get purge mdm
I underestimated it as after reboot the LightDM failed to start. What's more I could not get to Virtual Console, there was just an underscore blinking. After yet another reboot, the same behavior.
I fixed that in a while over SSH by purging LightDM and installing MDM back.
What is the correct procedure to replace MDM with LightDM on Linux Mint?