Uninstall kubuntu-desktop [duplicate]

I would recommend you to use aptitude to do this operation, this will search the packages that would remove the KDE environment and leave Ubuntu's default:

sudo apt-get install aptitude
aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(ubuntu-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' ubuntu-desktop+

This will search for any package that kubuntu-desktop depends to, but doesn't depends of ubuntu-desktop. Also, this method is a bit greedy. It will remove Qt packages, ergo mplayer2, VLC and any package that depends on Qt libraries may be deleted. Add those packages with a plus sign (+) at the end, like ubuntu-desktop package in this case. For other flavors:

Xubuntu

aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(xubuntu-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' xubuntu-desktop+

Lubuntu

aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(lubuntu-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' lubuntu-desktop+

Gnome

aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(ubuntu-gnome-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' ubuntu-gnome-desktop+

As you can see, only replace the last packages name with the name of your preferred to leave. If you used kde-core or other metapackages you should replace "kubuntu" with the name of the metapackage.

Making sense of aptitude search

To explain exactly which package are selected, lets explain the search command more deeply:

?and(
    ?and(
        ?and(                          // we're searching for packages that are
            ?reverse-depends(kubuntu), // reverse dependencies of kubuntu
            ?not(?reverse-depends(ubuntu-desktop)) // and not of ubuntu-desktop
            ),     // that fulfills the condition above 
        ?automatic // and is automatically installed
        ),
     ?not(                        // and also that are not
         ?or(                     // either required nor important
              ?priority(required),
              ?priority(important)
             )
         )
    )

Try installing Synaptic Package Manager from the Software Center.

Or just type in a terminal: sudo apt-get install synaptic

Once you have installed and opened the program, in the sections tab, find the KDE Desktop Environment sections and select all installed (green) selections (Ctrl+Click). Then right click, select Completely remove and apply the changes by clicking the Green check mark at the top of the window.