After installing CUDA on a headless server (using the below procedure) I noticed that X11 was turned on/installed.

I noticed X11 when using console redirection (remote KVM over IPMI/BMC) and saw a unity logon screen. The headless server is running Ubuntu Server 16.04LTS.

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo apt update
sudo apt install cuda

How to install CUDA without installing/activating X11? How to return the server back to it's headless settings?

1 Answer 1


You can get a minimal installation without a lot of the X stuff if you don't install all of the recommends:

sudo apt-get install --no-install-recommends cuda

To get back a headless server remove the cuda package and make an autoremove

sudo apt-get remove cuda
sudo apt-get autoremove

I'm not sure if the commands are completely right but they should give you a hint.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .