To uninstall xnest just follow these instructions.
sudo apt-get remove xnest
This will remove just the xnest package itself.
sudo apt-get remove --auto-remove xnest
This will remove the xnest package and any other dependant packages which are no longer needed.
If you also want to delete your local/config files for xnest then this will work.
sudo apt-get purge xnest
Or similarly, like this xnest
sudo apt-get purge --auto-remove xnest
|Maintainer||Debian X Strike Force <email@example.com>|
|Description||Nested X server X server, where it runs as a client. This means that it appears as another window in your current X session. Xnest relies upon its parent X server for font services.|