# How to safely remove X



## hirohitosan (Mar 1, 2011)

Hi there!

I want to uninstall X11 from my box since I'll not use it.

How can I remove x without destroying my server?

thanks


----------



## phoenix (Mar 1, 2011)

Did you install X?  If not, there's nothing to remove.    X is not part of FreeBSD.

If you did install X, then get a list of the X-related ports via `$ pkg_info -x xorg` and use `# pkg_delete -xi xorg` to delete them.


----------



## hirohitosan (Mar 1, 2011)

Thanks phoenix. I installed X by [cmd=]# pkg_add -r xorg[/cmd]


```
u# pkg_delete -xi xorg
delete xorg-server-1.7.7_1,1? y
pkg_delete: package 'xorg-server-1.7.7_1,1' is required by these other packages
and may not be deinstalled:
xf86-input-keyboard-1.5.0
xf86-input-mouse-1.6.0
xf86-video-ati-6.14.0
xf86-video-intel-2.7.1_4
xf86-video-mach64-6.8.2_1
xf86-video-nv-2.1.18
xf86-video-openchrome-0.2.904_3
xf86-video-r128-6.8.1_2
xf86-video-radeonhd-1.3.0_4
xf86-video-vesa-2.3.0_1
```

Do I need to remove all video drivers?


----------



## phoenix (Mar 1, 2011)

Yes.  Those video drivers are only used by X.  Just add them to the *pkg_delete* command:
`# pkg_delete -xi xf86 xorg`


----------

