0

Just as a warning, I am pretty new to linux and using terminal but hey so far linux has been too much fun learning to just turn around and go back to Windows.

Any way I will try to provide the most detail without too much.

Yesterday I was playing dress up in ubuntu-desktop (I guess unity?) and I had found that I wanted to remove a program I had just installed. So I had done the normal

sudo apt-get remove cairo-dock

Although it finished the process and I rebooted the program seemed to still be there, and in fact still worked.

So I then tried a few more purge and autoremove ect. rebooting then finding the program was still installed.

So finally I saw someone was explaining how to remove a program with different syntax than I had seen. So stupidly I happily and without second thought I typed in the terminal code that caused ubuntu-desktops doom. It was

sudo apt-get -purge cairo*

Obviously I was unaware at the time that command purges any file with "cairo" in the name.

As the command came to an end the screen when black and nothing happend. I rebooted and came to the same black screen.

I hit Esc while ubuntu was trying to boot and the list of processes ran down the screen.

lightdm was failing so I switched to gdm and rebooted

This time I could access the login screen.

After logging in I found the computer would sit with a black screen, the mouse is visible and moves but nothing shows up and trying to launch terminal "Ctrl+Alt+T" doesn't work at all you have to use the F3 method.

After jumping back into the terminal I decided to try installing gnome and cinammon. Both had installed and I can log in to both DE's just fine, gnome has a large population of programs in the application drawer that arn't installed. But cinnamon works great for now.

Although now I can see that my personal files are intact. None of the programs I had are. Which is fine.

Next I uninstalled lighdm reinstalled rebooted and logged in using the lightdm. It worked but did not fix ubuntu-desktop.

Back in cinnamon I installed synaptic and in that located ubuntu-desktop, mark for installation and it says it has unmet dependencies. I try to fix the dependencies and it says I need to fix my packages first.

Here's what it looks like when I try installing ubuntu-desktop through the terminal.

root@rex-122-CK-NF68:/home/rex# apt-get install ubuntu-desktop Reading package lists... Done Building dependency tree
Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: ubuntu-desktop : Depends: ubuntu-session but it is not going to be installed Depends: unity-control-center but it is not going to be installed Depends: unity-settings-daemon but it is not going to be installed Recommends: xul-ext-webaccounts but it is not going to be installed E: Unable to correct problems, you have held broken packages.

  • I know there's a workaround to this, but as you said, you're new to linux and the terminal, and I'm not the guy to turn to when trying to make some miracle command that restores everything... I'd recommend backing up your data and doing a fresh install. It's likely the fastest way to fix it, unless someone more versed knows a specific thing that needs to be reinstalled to restore everything to your original state. – Dooley_labs Jan 27 '16 at 19:43
0

I've had to do many fresh installs before I learned this. Use the command sudo apt-get update && sudo apt-get -f install. The first half gets a current list of packages and their dependencies from the server. The && tells the computer to run the second part after the first part completed successfully (which keeps errors from snowballing). Finally, the last part tells it to fix ( -f ) any broken packages by installing needed dependencies. If that doesn't work, try running sudo apt-get install ubuntu-desktop --reinstall (or whatever package needs to be fixed).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.