# update
sudo apt-get update
# install the 'tasksel' package so we can remove the desktop image
sudo apt-get install tasksel
# remove the desktop image
sudo tasksel remove ubuntu-desktop
# tell tasksel to start the server image setup
sudo tasksel install server
# install the server images
sudo apt-get install linux-server linux-image-server
# remove lightdm
sudo apt-get purge lightdm
# remove all packages no longer required (~400 MB)
sudo apt-get autoremove
VERY IMPORTANT: It is possible these operations can't be performed remotely on a headless server. Step 2 deletes important packages, including OpenVPN. On the machine I used the command, sshd was bound only to the OpenVPN interface, and now I have to go across town to continue :)
ReplyDeleteSerial console is your friend. It's ok, I haven't set it up yet, either ;-)
DeleteThis comment has been removed by the author.
ReplyDeleteThanks...it works
ReplyDeleteReading state information... Done
ReplyDeleteE: Unable to locate package linux-server
E: Unable to locate package linux-image-server
help pleas