1

So I was trying to get anaconda python to work with vscode. So I decided to remove python3 and see if the editor asks me if I want another interpreter. I ran sudo apt remove python3 and saw that many packages will be removed, but due to me beeing not the experienced linux user I couldn't figure out if they were important. Well now after a reboot I can only decrypt my harddrive but I can't login, the screen is black. Any ideas on how to get the os back up? Or at least a way to get my files before reinstalling the whole os?

Ubuntu 19.10.

Rinzwind
  • 299,756
Flajt
  • 21
  • You haven't provided OS/release details, however many Ubuntu tools rely on python (python3 for some releases) so if removed, they won't work and that should have been be expected. Please start with your OS/release. – guiverc Apr 24 '20 at 10:25
  • Can you boot into recovery mode by pressing shift when the maker's logo appears? If yes, check these logs /var/log/apt/term.log and /var/log/apt/history.log and reinstall what was removed doing a full update and upgrade, if you can. If your system is purged of packages like libc6 etc, you have to do a clean install. Possible duplicate https://askubuntu.com/questions/810854/ – kortewegdevries Apr 24 '20 at 10:28
  • @guiverc I added it. 19.09 or 19.10. – Flajt Apr 24 '20 at 10:47
  • There is no 19.09. – Pilot6 Apr 24 '20 at 10:50
  • And the latest would be 20.04 ;-) – Rinzwind Apr 24 '20 at 10:58
  • @kortewegdevries the libc6 seems not to be removed. Should I reinstall everything one by one, or would you recommend me to do it like the other question suggests? – Flajt Apr 24 '20 at 11:01
  • Can you log into some sort of terminal and can use apt-get or dpkg? – kortewegdevries Apr 24 '20 at 11:51
  • @Rinzwind Yeah I just stumbled over it. – Flajt Apr 24 '20 at 12:14
  • @kortewegdevries I opend in recovery mode. But there are issues if I want to run any apt get install or update. – Flajt Apr 24 '20 at 12:16
  • Then follow Rinzwind's suggestion. – kortewegdevries Apr 24 '20 at 12:58
  • @kortewegdevries ok I will try it a final time with Lan plugged in and if it doesn't work I will do that. – Flajt Apr 24 '20 at 14:44
  • @kortewegdevries I've got it. I plugged in the Ethernet cable 2x times and after the second time I could follow the post. Thx problem solved. – Flajt Apr 26 '20 at 18:28

1 Answers1

1

Any ideas on how to get the os back up? Or at least a way to get my files before reinstalling the whole os?

Please re-install the OS. You can make backups from the live session and during setup you can also mount without formatting the partitions that hold your data. The installer will only overwrite system related files when partitions are mounted. Make sure to use the same mount point names for the different partitions.

Another method could be to remove the disk from the system and install a new OS on a brand new disk and then mount your old one. That would allow you to copy all your files to the new system.

Rinzwind
  • 299,756