2

I installed boost dev tools through apt-get. Then I built boost myself. So to get rid of those dev tools, I did:

apt-get purge libboost*

I saw icons disappear off my screen one by one. The top bar disappeared, seems nearly everything in Ubuntu uses Boost. I should have removed libboost-all-dev.

Is there any way I can fix this mistake, or do I have to reinstall Ubuntu from scratch again?

heemayl
  • 91,753
  • Did you tried sudo apt-get install libboost* – 0x2b3bfa0 Mar 18 '15 at 10:46
  • @Helio, no. The problem is that apt-get uses regular expressions. There are hundreds of wrong instruction on the network, see http://askubuntu.com/questions/210976/apt-get-remove-with-wildcard-removed-way-more-than-expected-why. Anyway... you sure you do not have added a space between libboost and the *? – Rmano Mar 18 '15 at 11:00

1 Answers1

1

Do you still have a console? Examine the outputs from your last commands, or see less /var/log/apt/history.log (if that's not meaningful, go hardcore with less /var/log/dpkg.log), and then reinstall what you removed.

apt-get install aptitude

apt would have warned you if you did try to remove something essential, so the worst thing that could happen is that you are forced to reinstall everything you just removed before having your system in a status similar to that before.

warning though: If you uninstalled some system service you made special configurations to, then just reinstalling it will wipe your chances of recovering those old config files you just purged. If you need such, you need to take a far more elaborate approach - on a different system.

karel
  • 114,770
anx
  • 2,348
  • This is helpful. I'm in a root shell, turned on read/write, have network access. I was able to copy the log file, and find all packages purged (there's pages of them). I'd love to set this up so I can run it in one command, but these have the format such as:

    gnome-system-log:amd64 (3.9.90-2),

    I just need to remove the parenthesis, the stuff inside, and the comma, and I should be set...

    – Brad Peterson Mar 18 '15 at 11:04
  • I used nano to remove all lines but the purge line. Then I used Python to read in that purge line. Set up a regular expression to remove the (...), stuff. Wrote that back out to file. Modified it to a apt-get install script. Ran it, and, success? It says it's installing everything again. We'll see how good this works. :P – Brad Peterson Mar 18 '15 at 11:16
  • Ha! That did the trick. One reboot and it said there were some segfault errors with compiz. Another reboot and no errors at all! Thank you very much karel, this made my day much more tolerable. :) – Brad Peterson Mar 18 '15 at 11:30
  • Thanks for the heads up on this. That script listed there seems to be functioning correctly. – Brad Peterson Mar 20 '15 at 01:16