Be sure
not to follow the instructions in case
apt-get comes up with "the following are no longer needed".
When it said that to me after uninstalling wxWidgets once, I said "Oh yeah right, whatever. Go ahead, you sure know what you don't need". So I typed in the command that
apt-get had told me (something like "auto-remove"?) and hit "yes", without really reading.
So, it kept working for a whole long while, uninstalling each and everything that remotely had a dependency to something that had a dependency to a dependency with the letters 'w' and 'x' in it.
Seriously, I ended up with an installation that had no graphical user interface and no
sudo any more.
The latter was particularly funny. Try and reinstall
sudo if you need
sudo to run
apt-get