Change jetson OS(jetpack) from desktop environment to server environment

Hi all,
I used jetapk for jetson device that has Linux ubuntu 18.04 desktop, and I want to convert this desktop graphical os to server environment without GUI.
One commant that I used is that:
sudo systemctl set-default

I want to know is it possible to remove gdm3 desktop display manager without installing any display manager? I want to know the server os environment that only works with terminal and ssh, there systems have display manager?