Switch to a console (tty)
Press Ctrl + Alt + F2 (or another function key between F2 and F6) to switch to a text console.
Execute commands/steps:
Updates package lists
sudo apt update
Reinstalls KDE Plasma Desktop
sudo apt install --reinstall kde-plasma-desktop
Fixes broken dependencies
sudo apt install -f
Restarts the system
sudo reboot
If no system-specific data has been deleted or damaged, you should be able to log in normally again.
Will my settings be overwritten if I do this?
No, your personal settings should not be overwritten in /home/USER.
Reinstalling KDE Plasma only affects system files, not your user-specific settings stored in your home directory.
Be cautious with configuration files for system applications, especially in /etc, they maybe overwritten if no prompt appears.
If you asked about configuration files during reinstallation, you can usually keep your existing ones.
You should always do a backup of your important configuration files and data.