2 days before my Ubuntu got slow, I thought to remove the Python 3 from my Ubuntu installed in the virtual machine using VMware, but after removing the Python, it was found that everything got removed, and Ubuntu has only a login option for command control. but how to change it in real Ubuntu becomes difficult to me. Can you help find a solution to this problem? My data is stuck in Ubuntu.
-
Related: How to remove all traces of python from Ubuntu – Raffa Nov 27 '23 at 08:13
2 Answers
"remove the Python 3 from my Ubuntu"
Removing Python3 effectively destroys your system. Sorry. You can no longer use apt. Many features of the system are now gone.
For beginners: Use a LiveUSB's "Try Ubuntu" environment to rescue your data from your VM to another secure storage location. Then wipe and reinstall a new Ubuntu VM. For your next install, consider regular backups of your data. Those can save you a lot of frustration on a bad day.
For advanced users: Download the appropriate python3 and python3-minimal packages for your release. (If you don't know how to find those, then you're not an advanced user. See For beginners). You might need to trace and download dependencies. Use dpkg to install them, thereby restoring apt. Then use apt to restore your desktop metapackage, if needed, and make additional repairs. This process may take longer than a reinstall, so it might not be better than the beginner route. Truly advanced users enjoy benefits of regular data backups -- they have bad days too.

- 62,253
I have come across a similar issue and I lost my Ubuntu GUI. I hope you are having the same issue so do the following steps:
- Open the terminal or the ttyl using ctrl + alt + f3
- Login to the terminal using your username and password
- Install the Ubuntu-desktop using
apt install ubuntu-desktop
. - After the installation, do a system reboot using the
reboot
command

- 1,246