You should be able to simply uninstall the Desktop Environments you no longer want and then run the command to install Ubuntu Studio, which will only install packages that may have been removed while clearing out the other Desktop Environments.
As is the case in any such situation, I would highly recommend backing up all of your data just in case what should work ends up not working as expected.
To remove Lubuntu and Xubuntu, you can take a look at my post here.
Remove Kubuntu:
sudo apt-get remove akonadi-backend-mysql akonadi-server akregator amarok amarok-common amarok-utils apport-kde apturl-kde ark bluedevil cdparanoia cdrdao cryptsetup docbook-xml docbook-xsl dolphin dragonplayer freespacenotifier gnupg-agent gnupg2 gpgsm gpsd gstreamer0.10-qapt gtk2-engines-oxygen gtk3-engines-oxygen gwenview ibus-qt4 icoutils jockey-kde k3b k3b-data kaccessible kaddressbook kamera kate kate-data katepart kcalc kde-baseapps-bin kde-baseapps-data kde-config-gtk kde-config-touchpad kde-runtime kde-runtime-data kde-style-oxygen kde-wallpapers-default kde-window-manager kde-window-manager-common kde-workspace kde-workspace-bin kde-workspace-data kde-workspace-kgreet-plugins kde-zeroconf kdegames-card-data kdegraphics-strigi-analyzer kdelibs-bin kdelibs5-data kdelibs5-plugins kdemultimedia-kio-plugins kdenetwork-filesharing kdepasswd kdepim-kresources kdepim-runtime kdepim-strigi-plugins kdepimlibs-kio-plugins kdesudo kdm kdoctools khelpcenter4 kinfocenter klipper kmag kmail kmenuedit kmix kmousetool knotes konsole kontact kopete kopete-message-indicator korganizer kpat kppp ksnapshot ksysguard ksysguardd ksystemlog ktimetracker ktorrent ktorrent-data kubuntu-debug-installer kubuntu-default-settings kubuntu-desktop kubuntu-docs kubuntu-firefox-installer kubuntu-netbook-default-settings kubuntu-notification-helper kubuntu-web-shortcuts kvkbd kwalletmanager language-selector-kde libakonadi-calendar4 libakonadi-contact4 libakonadi-kabc4 libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4 libakonadi-notes4 libakonadiprotocolinternals1 libassuan0 libattica0.3 libbluedevil1 libboost-program-options1.46.1 libcalendarsupport4 libcln6 libclucene0ldbl libdebconf-kde0 libdlrestrictions1 libdmtx0a libencode-locale-perl libepub0 libeventviews4 libfile-listing-perl libflac++6 libfont-afm-perl libgadu3 libgif4 libgpgme++2 libgps20 libgrantlee-core0 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libibus-qt1 libilmbase6 libincidenceeditorsng4 libindicate-qt1 libio-socket-inet6-perl libio-socket-ssl-perl libk3b6 libkabc4 libkactivities-bin libkactivities6 libkalarmcal2 libkateinterfaces4 libkatepartinterfaces4 libkblog4 libkcal4 libkcalcore4 libkcalutils4 libkcddb4 libkcmutils4 libkde3support4 libkdeclarative5 libkdecorations4 libkdecore5 libkdegames5a libkdepim4 libkdepimdbusinterfaces4 libkdesu5 libkdeui5 libkdewebkit5 libkdgantt2 libkdnssd4 libkemoticons4 libkephal4abi1 libkexiv2-10 libkexiv2-data libkfile4 libkholidays4 libkhtml5 libkidletime4 libkimap4 libkio5 libkipi-data libkipi8 libkjsapi4 libkjsembed4 libkldap4 libkleo4 libkmanagesieve4 libkmbox4 libkmediaplayer4 libkmime4 libknewstuff2-4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkonq-common libkonq5-templates libkonq5abi1 libkontactinterface4 libkopete4 libkparts4 libkpgp4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4 libkpty4 libkresources4 libkrosscore4 libksba8 libkscreensaver5 libksgrd4 libksieve4 libksieveui4 libksignalplotter4 libktexteditor4 libktnef4 libktorrent-l10n libktorrent3 libkunitconversion4 libkwineffects1abi3 libkwinglutils1 libkwinnvidiahack4 libkworkspace4abi1 libkxmlrpcclient4 liblastfm0 libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmailcommon4 libmailtools-perl libmailtransport4 libmessagecomposer4 libmessagecore4 libmessagelist4 libmessageviewer4 libmicroblog4 libmpcdec6 libmsn0.3 libmuonprivate1 libmygpo-qt1 libmysqlclient18 libnepomuk4 libnepomukdatamanagement4 libnepomukquery4a libnepomuksync4 libnepomukutils4 libnet-http-perl libnet-ssleay-perl libntrack-qt4-1 libntrack0 libokularcore1abi1 libopenexr6 libotr2 libphonon4 libplasma-geolocation-interface4 libplasma3 libplasmaclock4abi3 libplasmagenericshell4 libpolkit-qt-1-1 libpoppler-qt4-3 libprison0 libprocesscore4abi1 libprocessui4a libqalculate5 libqapt-runtime libqapt1 libqca2 libqca2-plugin-ossl libqgpgme1 libqimageblitz4 libqjson0 libqrencode3 libqt4-designer libqt4-help libqt4-qt3support libqt4-scripttools libqt4-sql-mysql libqt4-test libqtassistantclient4 libqtglib-2.0-0 libqtgstreamer-0.10-0 libqtscript4-core libqtscript4-gui libqtscript4-network libqtscript4-sql libqtscript4-uitools libqtscript4-xml libqtwebkit4 libreoffice-kde libreoffice-style-oxygen libsocket6-perl libsolid4 libsolidcontrol4abi2 libsolidcontrolifaces4abi2 libsoprano4 libstreamanalyzer0 libstreams0 libsyndication4 libtag-extras1 libtaskmanager4abi3 libtemplateparser4 libthreadweaver4 libtimedate-perl liburi-perl libvirtodbc0 libweather-ion6 libwww-perl libwww-robotrules-perl libxml2-utils libxss1 libzip2 muon muon-installer muon-notifier muon-updater mysql-client-core-5.5 mysql-common mysql-server-core-5.5 ntrack-module-libnl-0 odbcinst odbcinst1debian2 okular okular-extra-backends oxygen-cursor-theme oxygen-icon-theme partitionmanager phonon phonon-backend-gstreamer pinentry-gtk2 pinentry-qt4 plasma-dataengines-addons plasma-dataengines-workspace plasma-desktop plasma-netbook plasma-scriptengine-javascript plasma-scriptengine-python plasma-widget-facebook plasma-widget-folderview plasma-widget-kimpanel plasma-widget-menubar plasma-widget-message-indicator plasma-widget-networkmanagement plasma-widgets-addons plasma-widgets-workspace plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text polkit-kde-1 printer-applet python-kde4 python-pyudev python-qt4 python-qt4-dbus python-sip qapt-batch qapt-deb-installer quassel quassel-data rekonq sgml-data shared-desktop-ontologies software-properties-kde soprano-daemon system-config-printer-kde systemsettings tasks-icons update-manager-kde usb-creator-kde userconfig virtuoso-minimal virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common xsettings-kde
Remove Edubuntu:
sudo apt-get remove edubuntu-desktop
Remove Mythbuntu:
sudo apt-get remove mythbuntu
Remove Ubuntu Desktop:
sudo apt-get remove compizconfig-settings-manager compiz-fusion-plugins-extra compiz-plugins-extra
sudo apt-get purge compiz*
sudo apt-get remove ubuntu-desktop
Install Ubuntu Studio
(this is just to ensure that any packages that may have been lost while removing other Desktop Environments are reinstalled):
sudo apt-get install ubuntustudio-desktop ubuntustudio-icon-theme ubuntustudio-look ubuntustudio-theme ubuntustudio-wallpapers usplash-theme-ubuntustudio
Upgrade and Cleanup
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get autoremove
To perform ALL of the above steps in one shot:
sudo apt-get remove abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview bison blueman brltty-x11 catfish elementary-icon-theme exo-utils flex gigolo gimp gimp-data gmusicbrowser gnome-icon-theme-full gnome-system-tools gnome-time-admin gnumeric gnumeric-common gnumeric-doc gstreamer0.10-gnomevfs gthumb gthumb-data gtk2-engines-pixbuf gtk2-engines-xfce indicator-application-gtk2 indicator-messages-gtk2 indicator-sound-gtk2 indicator-status-provider-pidgin leafpad libabiword-2.8 libaiksaurus-1.2-0c2a libaiksaurus-1.2-data libaiksaurusgtk-1.2-0c2a libao-common libao4 libaudio-scrobbler-perl libbabl-0.0-0 libclutter-1.0-0 libclutter-1.0-common libclutter-gtk-1.0-0 libcogl-common libcogl5 libconfig-inifiles-perl libencode-locale-perl libept1 libexo-1-0 libexo-common libfile-listing-perl libfont-afm-perl libgarcon-1-0 libgarcon-common libgdome2-0 libgdome2-cpp-smart0c2a libgegl-0.0-0 libgimp2.0 libglade2-0 libgnomevfs2-extra libgoffice-0.8-8 libgoffice-0.8-8-common libgsf-1-114 libgsf-1-common libgstreamer-perl libgtk2-notify-perl libgtk2-trayicon-perl libgtkmathview0c2a libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libid3tag0 libido-0.1-0 libilmbase6 libio-socket-ssl-perl libjpeg-progs libkeybinder0 liblink-grammar4 libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmad0 libmailtools-perl libnet-dbus-perl libnet-http-perl libnet-ssleay-perl liboobs-1-5 libopenexr6 libotr2 libots0 libpolkit-gtk-1-0 libsexy2 libtagc0 libthunarx-2-0 libtie-ixhash-perl libtimedate-perl libtumbler-1-0 liburi-perl libwv-1.2-3 libwww-perl libwww-robotrules-perl libxfce4ui-1-0 libxfce4util-bin libxfce4util-common libxfce4util4 libxfcegui4-4 libxfconf-0-2 libxml-parser-perl libxml-twig-perl libxml-xpath-perl libxss1 lightdm-gtk-greeter link-grammar-dictionaries-en m4 mpg321 murrine-themes orage parole pastebinit pidgin pidgin-data pidgin-libnotify pidgin-microblog pidgin-otr plymouth-theme-xubuntu-logo plymouth-theme-xubuntu-text python-configobj python-glade2 quadrapassel ristretto screensaver-default-images synaptic system-tools-backends tango-icon-theme tango-icon-theme-common tcl8.5 thunar thunar-archive-plugin thunar-data thunar-media-tags-plugin thunar-volman ttf-droid ttf-lyx tumbler tumbler-common xchat xchat-common xfburn xfce-keyboard-shortcuts xfce4-appfinder xfce4-cpugraph-plugin xfce4-dict xfce4-fsguard-plugin xfce4-indicator-plugin xfce4-mailwatch-plugin xfce4-mixer xfce4-mount-plugin xfce4-netload-plugin xfce4-notes xfce4-notes-plugin xfce4-notifyd xfce4-panel xfce4-places-plugin xfce4-power-manager xfce4-power-manager-data xfce4-quicklauncher-plugin xfce4-screenshooter xfce4-session xfce4-settings xfce4-smartbookmark-plugin xfce4-systemload-plugin xfce4-taskmanager xfce4-terminal xfce4-utils xfce4-verve-plugin xfce4-volumed xfce4-weather-plugin xfconf xfdesktop4 xfdesktop4-data xfwm4 xfwm4-themes xscreensaver xscreensaver-data xscreensaver-gl xubuntu-artwork xubuntu-default-settings xubuntu-desktop xubuntu-docs xubuntu-icon-theme xubuntu-wallpapers && sudo apt-get purge --auto-remove abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview ace-of-penguins audacious audacious-plugins audacious-plugins-data blueman chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg elementary-icon-theme esound-common galculator gdebi gdebi-core gecko-mediaplayer giblib1 gnome-icon-theme-full gnome-mplayer gnome-system-tools gnome-time-admin gnumeric gnumeric-common gnumeric-doc gpicview gtk2-engines-pixbuf guvcview hardinfo indicator-status-provider-pidgin leafpad libaacs0 libabiword-2.9 libaudclient2 libaudcore1 libaudiofile1 libbinio1ldbl libbluray1 libbs2b0 libcddb2 libcompfaceg1 libcue1 libencode-locale-perl libept1.4.12 libesd0 libexo-1-0 libexo-common libexo-helpers libfile-listing-perl libfluidsynth1 libfm-data libfm-gtk-data libfm-gtk1 libfm1 libfont-afm-perl libgdome2-0 libgdome2-cpp-smart0c2a libglade2-0 libgmlib0 libgmtk0 libgmtk0-data libgoffice-0.8-8 libgoffice-0.8-8-common libgringotts2 libgsf-1-114 libgsf-1-common libgtkmathview0c2a libguess1 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libid3tag0 libimlib2 libio-socket-inet6-perl libio-socket-ssl-perl libjpeg-progs libjpeg-turbo-progs liblink-grammar4 libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libmcrypt4 libmenu-cache1 libmowgli2 libmpg123-0 libnet-dbus-perl libnet-http-perl libnet-ssleay-perl libobrender27 libobt0 libonig2 liboobs-1-5 libopts25 libots0 libpisock9 libresid-builder0c2a libsidplay2 libsocket6-perl libtar0 libtidy-0.99-0 libtie-ixhash-perl libtimedate-perl libuniconf4.6 liburi-perl libvdpau1 libwebcam0 libwv-1.2-4 libwvstreams4.6-base libwvstreams4.6-extras libwww-perl libwww-robotrules-perl libxfce4ui-1-0 libxfce4util-bin libxfce4util-common libxfce4util4 libxfconf-0-2 libxml-parser-perl libxml-twig-perl libxml-xpath-perl libxss1 lightdm-gtk-greeter link-grammar-dictionaries-en lm-sensors lubuntu-artwork lubuntu-artwork-12-04 lubuntu-core lubuntu-default-settings lubuntu-desktop lubuntu-icon-theme lubuntu-software-center lxappearance lxappearance-obconf lxinput lxkeymap lxlauncher lxmenu-data lxpanel lxpanel-indicator-applet-plugin lxrandr lxsession lxsession-edit lxshortcut lxtask lxterminal mplayer2 mtpaint ntp obconf openbox openbox-themes osmo pcmanfm pidgin pidgin-data pidgin-libnotify pidgin-microblog plymouth-theme-lubuntu-logo plymouth-theme-lubuntu-text python-pysqlite2 python-xklavier scrot sylpheed sylpheed-doc sylpheed-i18n sylpheed-plugins synaptic system-tools-backends transmission ttf-lyx uvcdynctrl uvcdynctrl-data wvdial xfburn xfce-keyboard-shortcuts xfce4-power-manager xfce4-power-manager-data xfconf xfonts-100dpi xpad xscreensaver xscreensaver-data && sudo apt-get remove akonadi-backend-mysql akonadi-server akregator amarok amarok-common amarok-utils apport-kde apturl-kde ark bluedevil cdparanoia cdrdao cryptsetup docbook-xml docbook-xsl dolphin dragonplayer freespacenotifier gnupg-agent gnupg2 gpgsm gpsd gstreamer0.10-qapt gtk2-engines-oxygen gtk3-engines-oxygen gwenview ibus-qt4 icoutils jockey-kde k3b k3b-data kaccessible kaddressbook kamera kate kate-data katepart kcalc kde-baseapps-bin kde-baseapps-data kde-config-gtk kde-config-touchpad kde-runtime kde-runtime-data kde-style-oxygen kde-wallpapers-default kde-window-manager kde-window-manager-common kde-workspace kde-workspace-bin kde-workspace-data kde-workspace-kgreet-plugins kde-zeroconf kdegames-card-data kdegraphics-strigi-analyzer kdelibs-bin kdelibs5-data kdelibs5-plugins kdemultimedia-kio-plugins kdenetwork-filesharing kdepasswd kdepim-kresources kdepim-runtime kdepim-strigi-plugins kdepimlibs-kio-plugins kdesudo kdm kdoctools khelpcenter4 kinfocenter klipper kmag kmail kmenuedit kmix kmousetool knotes konsole kontact kopete kopete-message-indicator korganizer kpat kppp ksnapshot ksysguard ksysguardd ksystemlog ktimetracker ktorrent ktorrent-data kubuntu-debug-installer kubuntu-default-settings kubuntu-desktop kubuntu-docs kubuntu-firefox-installer kubuntu-netbook-default-settings kubuntu-notification-helper kubuntu-web-shortcuts kvkbd kwalletmanager language-selector-kde libakonadi-calendar4 libakonadi-contact4 libakonadi-kabc4 libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4 libakonadi-notes4 libakonadiprotocolinternals1 libassuan0 libattica0.3 libbluedevil1 libboost-program-options1.46.1 libcalendarsupport4 libcln6 libclucene0ldbl libdebconf-kde0 libdlrestrictions1 libdmtx0a libencode-locale-perl libepub0 libeventviews4 libfile-listing-perl libflac++6 libfont-afm-perl libgadu3 libgif4 libgpgme++2 libgps20 libgrantlee-core0 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libibus-qt1 libilmbase6 libincidenceeditorsng4 libindicate-qt1 libio-socket-inet6-perl libio-socket-ssl-perl libk3b6 libkabc4 libkactivities-bin libkactivities6 libkalarmcal2 libkateinterfaces4 libkatepartinterfaces4 libkblog4 libkcal4 libkcalcore4 libkcalutils4 libkcddb4 libkcmutils4 libkde3support4 libkdeclarative5 libkdecorations4 libkdecore5 libkdegames5a libkdepim4 libkdepimdbusinterfaces4 libkdesu5 libkdeui5 libkdewebkit5 libkdgantt2 libkdnssd4 libkemoticons4 libkephal4abi1 libkexiv2-10 libkexiv2-data libkfile4 libkholidays4 libkhtml5 libkidletime4 libkimap4 libkio5 libkipi-data libkipi8 libkjsapi4 libkjsembed4 libkldap4 libkleo4 libkmanagesieve4 libkmbox4 libkmediaplayer4 libkmime4 libknewstuff2-4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkonq-common libkonq5-templates libkonq5abi1 libkontactinterface4 libkopete4 libkparts4 libkpgp4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4 libkpty4 libkresources4 libkrosscore4 libksba8 libkscreensaver5 libksgrd4 libksieve4 libksieveui4 libksignalplotter4 libktexteditor4 libktnef4 libktorrent-l10n libktorrent3 libkunitconversion4 libkwineffects1abi3 libkwinglutils1 libkwinnvidiahack4 libkworkspace4abi1 libkxmlrpcclient4 liblastfm0 libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmailcommon4 libmailtools-perl libmailtransport4 libmessagecomposer4 libmessagecore4 libmessagelist4 libmessageviewer4 libmicroblog4 libmpcdec6 libmsn0.3 libmuonprivate1 libmygpo-qt1 libmysqlclient18 libnepomuk4 libnepomukdatamanagement4 libnepomukquery4a libnepomuksync4 libnepomukutils4 libnet-http-perl libnet-ssleay-perl libntrack-qt4-1 libntrack0 libokularcore1abi1 libopenexr6 libotr2 libphonon4 libplasma-geolocation-interface4 libplasma3 libplasmaclock4abi3 libplasmagenericshell4 libpolkit-qt-1-1 libpoppler-qt4-3 libprison0 libprocesscore4abi1 libprocessui4a libqalculate5 libqapt-runtime libqapt1 libqca2 libqca2-plugin-ossl libqgpgme1 libqimageblitz4 libqjson0 libqrencode3 libqt4-designer libqt4-help libqt4-qt3support libqt4-scripttools libqt4-sql-mysql libqt4-test libqtassistantclient4 libqtglib-2.0-0 libqtgstreamer-0.10-0 libqtscript4-core libqtscript4-gui libqtscript4-network libqtscript4-sql libqtscript4-uitools libqtscript4-xml libqtwebkit4 libreoffice-kde libreoffice-style-oxygen libsocket6-perl libsolid4 libsolidcontrol4abi2 libsolidcontrolifaces4abi2 libsoprano4 libstreamanalyzer0 libstreams0 libsyndication4 libtag-extras1 libtaskmanager4abi3 libtemplateparser4 libthreadweaver4 libtimedate-perl liburi-perl libvirtodbc0 libweather-ion6 libwww-perl libwww-robotrules-perl libxml2-utils libxss1 libzip2 muon muon-installer muon-notifier muon-updater mysql-client-core-5.5 mysql-common mysql-server-core-5.5 ntrack-module-libnl-0 odbcinst odbcinst1debian2 okular okular-extra-backends oxygen-cursor-theme oxygen-icon-theme partitionmanager phonon phonon-backend-gstreamer pinentry-gtk2 pinentry-qt4 plasma-dataengines-addons plasma-dataengines-workspace plasma-desktop plasma-netbook plasma-scriptengine-javascript plasma-scriptengine-python plasma-widget-facebook plasma-widget-folderview plasma-widget-kimpanel plasma-widget-menubar plasma-widget-message-indicator plasma-widget-networkmanagement plasma-widgets-addons plasma-widgets-workspace plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text polkit-kde-1 printer-applet python-kde4 python-pyudev python-qt4 python-qt4-dbus python-sip qapt-batch qapt-deb-installer quassel quassel-data rekonq sgml-data shared-desktop-ontologies software-properties-kde soprano-daemon system-config-printer-kde systemsettings tasks-icons update-manager-kde usb-creator-kde userconfig virtuoso-minimal virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common xsettings-kde && sudo apt-get remove edubuntu-desktop && sudo apt-get remove mythbuntu && sudo apt-get remove compizconfig-settings-manager compiz-fusion-plugins-extra compiz-plugins-extra && sudo apt-get purge compiz* && sudo apt-get remove ubuntu-desktop && sudo apt-get install ubuntustudio-desktop ubuntustudio-icon-theme ubuntustudio-look ubuntustudio-theme ubuntustudio-wallpapers usplash-theme-ubuntustudio && sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove
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)
)
)
)
Best Answer
As per the suggestion in this site, you can get pure xubuntu-desktop:
From Ubuntu Quantal:
From Kubuntu Quantal:
From Lubuntu Quantal:
It suggests to do
sudo apt-get install xubuntu-desktop
which you have already done. How to convert Ubuntu to Xubuntu talks about the changes you will get so you must edit the command and see what you may need.