You want to switch to ubuntu from the command line right?
You must first update Kubuntu and then switch to the default desktop environment:
A "Default display manager" menu should appear. Choose gdm3 as default and reboot system.
After the system restarts, it will be received by the GDM. Choose Ubuntu as your desktop environment.
If you want to remove kubuntu, you must follow these commands:
sudo apt autoremove plasma* sddm
sudo apt autoremove kde* qml-module-org-kde* libkf5kdelibs4support* libkf5libkdepim* software-properties-kde xdg-desktop-portal-kde libkde* konsole
After that you should have your Ubuntu system working properly.