I installed multiple versions of openssl (because mysqlconnectorcame with them), but that broke cmake, so I tried re-installing openssl with sudo apt-get remove openssl
. However, that apparently removed a lot of dependencies. Can I get these back without reinstalling my operating system? Do I have to re-install them one by one (there are nearly a hundred it looks like)?

- 147
-
2Faster to reinstall your OS. Removing OpenSSL basically cripples your system for anything SSL-related, so it'd be a lesson in self-punishment to try and reinstall everything one by one. – Thomas Ward Sep 23 '19 at 19:28
-
1@ThomasWard I have some work I need to back up so taking that into account, it might be the only option. I'm trying to drag and drop things into dropbox, but my file viewer isn't even working. – Taylor Sep 23 '19 at 19:33
-
3There's a lesson here about carefully reading apt's proposed actions before agreeing. That prompt really is there to protect you. – user535733 Sep 23 '19 at 19:44
-
Related: Ubuntu system is broken after accidentally uninstalling many packages – Eliah Kagan Sep 25 '19 at 11:49
3 Answers
I do not see serious problems here.
You should login onto the first text terminal (accessible with Ctrl+Alt+F1) and then install software from here.
Carefully read the contents of APT log-files with more /var/log/apt/history.log
and more /var/log/apt/term.log
and then install removed packages manually with something like:
sudo apt update
sudo apt install removed-app-name
If your desktop was removed too, then use something like:
sudo apt update
sudo apt install ubuntu-desktop^ # if you had Ubuntu GNOME desktop
#sudo apt install ubuntu-unity-desktop # if you had Ubuntu Unity desktop
#sudo apt install kubuntu-desktop^ # if you had Kubuntu
#sudo apt install ubuntu-mate-desktop^ # if you had Ubuntu with MATE DE

- 99,918
-
do I have to reinstall them one by one? what is the relationship between
ubuntu-desktop
and all of these packages? – Taylor Sep 23 '19 at 20:22 -
It depends on desktop environment. You need to install one package. If you had GNOME - then it would be
ubuntu-desktop^
, for KDE usekubuntu-desktop^
and so on. When you get desktop reinstalled then look intohistory.log
and install other packages. – N0rbert Sep 23 '19 at 20:26 -
you're saying I don't need to install all of these packages. I don't understand that. I understand that there are different desktops. I just don't know why you're bringing this up, how this fixes my problem, or how it answers my original question. – Taylor Sep 23 '19 at 20:27
-
Then it depends on what do you mean by "removed a lot of dependencies." Was your desktop removed? I suppose that it is broken as you wrote "my file viewer isn't even working"... – N0rbert Sep 23 '19 at 20:28
I would suggest you to check history and get results of apt related operations you did using command line by history | grep -i apt
command and check at which point or command you purged all libraries. You can do installation of same packages you purged.
Example:
If sudo apt purge openssl
command removed your libraries then you can re-install it by sudo apt install openssl
command.
By that way it will install all libraries and dependencies automatically which you purged.

- 19,083
-
-
-
1+1 for searching history. Perhaps a short intro for grep
sudo apt
on~/.bash_history
might be needed though. – WinEunuuchs2Unix Sep 23 '19 at 21:44
The "Diagnose, Understand, then Fix" method must be done in this order. Must!
"... broke cmake
"?
You can find the names of the uninstalled packages in /var/log/apt
.

- 36,399