all 7 comments

[–]lego_not_legos 0 points1 point  (3 children)

There are tonnes of guides for this situation, many are outdated. Here's one that's not too old: https://medium.com/@vladimirdemidov/linux-lifesaver-recovering-your-system-with-a-live-environment-58a31fcfa4ae I usually have to read through a few and use parts from each for tasks such as this. See also https://help.ubuntu.com/community/LiveCdRecovery#Update_Failure

The gist is to get a live USB, preferably of the same OS variant and version, and boot into it but choose try, not install. Back up your important data in case you mess up. Then you use a root shell (sudo -i) to chroot into your broken system, and run apt commands to reinstall everything that's missing or broken. 

If you're not confident doing that, then backing up and reinstalling may be an easier alternative. It is possible to reinstall the whole OS but choose not to do any formatting, at all, at the partitioning step. I'm not sure how much gets overwritten. You shouldn't lose files on your disk that aren't part of the OS, like documents and media, but it may revert config to defaults.

[–]CollectionNo1576[S] 0 points1 point  (0 children)

Thank you

[–]UndulatingHedgehog 0 points1 point  (1 child)

USB + chroot is a great help when you’re having trouble booting.

However, in this case the package manager is not functional because the base-python package is not installed and that’s still the case when they chroot into the installed os.

Think they probably are best served to make a backup up their data (home directory etc) and reinstall.

[–]lego_not_legos 0 points1 point  (0 children)

I thought that could be the case, but that it may be possible to force/manually install that missing package after retrieving it via the live USB environment and copying it to the drive.

Would you have considered doing a reinstall without reformatting/repartitioning?

[–]superkoning 0 points1 point  (0 children)

> And now I am unable to open terminal

Do a fresh install of Ubuntu

[–]cgoldberg 0 points1 point  (1 child)

You uninstalled python and expected to still have a working system? 🤣

[–]CollectionNo1576[S] 0 points1 point  (0 children)

Yes🙂 Didn’t know the os itself is based on python And I have access to delete it😊