-1

Ok so here is the problem in short: I run ubuntu 14.04 LTS with two desktop environments: Gnome which i usually use and spectrwm. I removed gnome (followed instructions from somewhere) and left out with spectrwm. I accidentally ran the following command: "sudo apt-get remove unity* ubuntu-desktop" Which caused a disaster (cant access any desktop environment even spectrwm, running on low graphics mode, ...) so how do I revert my last command ? By the way I tried to reinstall ubuntu-desktop and it gave me unmet dependencies errors, I did not try installing any unity package because I do not know which packages got removed because of this command.

Thank you all I really appreciate your help.

1 Answers1

0

To find all unity packages that where removed type this command:

dpkg --list | grep -P '^rc  unity.*' | awk '{print $2}'

You need to reinstall all those. After that install the package ubuntu-desktop again with:

apt-get install ubuntu-desktop
  • dpkg --list list all the packages that are installed or where installed and removed (with apt-get remove )
  • grep -P '^rc unity.*' lists all packages with state rc (removed) and start with unity
  • awk '{print $2}' prints only the package name
chaos
  • 28,186