How remove graphical interface
In order to accomplish this we go in Server Manager and we open Add roles and Features Wizard we select or deselect under User Interfaces and Infrastructure first the Graphical Management Tools and Infrastructure and second Server Graphical Shell as shown in figure 1.
Figure 1: User Interface and Infrastructure
We can also remove the graphical user interface feature in power shell (figure 2)
Figure 2: Removing graphical interface in powershell