kex unable to connect to socket: connection refused(10061...
and therefore, it cannot be deleted. To resolve this, you need to find the processes that are using the X server and terminate them. Before doing so, be aware that this can cause your graphical user interface to stop functioning,