Well - ;)
1) Your command:
sudo apt-get remove --purge nvidia-*
Is removing all packages that have the 'nvidia' part.
About regex:
2) You could simulate things:
man apt-get
-s, --simulate, --just-print, --dry-run, --recon, --no-act
No action; perform a simulation of events that would occur but do not actually change the system.
Simulation, at here
A simulation, at here, (K)ubuntu 13.04, KDE 4.10.5, I have the AMD not the Nvidia:
:~$ apt-get -s remove --purge nvidia-*
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
glx-alternative-mesa* glx-diversions* kde-window-manager* kde-workspace* kde-workspace-dev*
libkwinactivenvidiahack4* libkwinnvidiahack4* nvidia-installer-cleanup*
0 upgraded, 0 newly installed, 8 to remove and 0 not upgraded.
Purg glx-alternative-mesa [0.2.90]
Purg glx-diversions [0.2.90]
Purg kde-workspace [4:4.10.5-0ubuntu0.1]
Purg kde-window-manager [4:4.10.5-0ubuntu0.1]
Purg kde-workspace-dev [4:4.10.5-0ubuntu0.1]
Purg libkwinactivenvidiahack4 [4:4.10.5-0ubuntu0.1]
Purg libkwinnvidiahack4 [4:4.10.5-0ubuntu0.1]
Purg nvidia-installer-cleanup [20120731+1]
Whole output: http://pastebin.com/t3Nwca8f
Why the kde-window-manager will be removed
The kde-window-manager is depending
:~$ apt-cache show kde-window-manager
...
Depends:..libkwinnvidiahack4,...
Why the kubuntu-desktop will be removed
(if it is installed)
The kubuntu-desktop is depending
:~$ apt-cache show kubuntu-desktop
Depends:...kde-window-manager, ...