I installed KDE plasma and I removed it but I am not getting my desktop environment now. I installed gnome again but it does not default.please help me how can I remove KDE completely and set gnome as default DE?
You can check for the plasma-desktop dependencies like this
sudo apt depends plasma-desktop | grep Depends | cut -f2 -d: >> plasma-desktop-dependencies.txt and can manually remove them by creating list of those and applying
sudo apt remove listed_packages and then just install the ubuntu-desktop as it is a ready made gnome desktop environment.
apt remove plasma-desktop && apt autoremove && apt install ubuntu-desktop
which will remove kde components and install the Ubuntu-gnome desktop with lightdm and to make sure to use lightdm as dm, run
sudo dpkg-reconfigure lightdm and it supposed to pop up a window to choose between DMs, choose lightdm and edit
$HOME/.dmrc and set
to have gnome as default DE.