0

I experienced a problem after removing wine as I used "purge" command instead of "remove" and now I am missing most of my programs including terminal and software center. I also lost most drives and can not run a Live USB to reinstall the system. The only program it shows at any download attempt is AptURL which is not helping at all. I can not access any settings as all the bars are missing (top and left side). Can anyone help me with my problem?

I am running a 14.04 Ubuntu.

  • Yeah, that happens. However in the default configuration, all package managers warn you and ask for confirmation, if the package dependencies require removal (or installation) of other packages than the ones specified directly. In future pay attention to the messages and questions before you click/press “yes”. – David Foerster Oct 19 '14 at 20:21
  • This is actually caused by incorrect use of `*` to match packages (`wine*` matches way, *way* more than people think). See [Why does apt removes unwanted packages when giving * as suffix?](http://askubuntu.com/questions/431604/why-does-apt-removes-unwanted-packages-when-giving-as-suffix). For solutions, see [How to fix Ubuntu after accidentally uninstalling many packages?](http://askubuntu.com/questions/249367/how-to-fix-ubuntu-after-accidentally-uninstalling-many-packages) – Eliah Kagan Oct 20 '14 at 01:18

2 Answers2

1

The command:

$ sudo apt-get install ubuntu-desktop

Should get your defaults back.

L. D. James
  • 24,768
  • 10
  • 68
  • 116
  • well I kinda dont have terminal, so...yeah – Andrews Gofmans Oct 19 '14 at 20:25
  • In that case you need to boot into [recovery mode](https://wiki.ubuntu.com/RecoveryMode) and issue the command there. @kyodake recommends a similar route but suggests many more (and partially dangerous) things. – David Foerster Oct 19 '14 at 20:29
  • There are a number of ways to bring up the terminal. You can hit `control-ALT-F2` which will bring you to a tty console (terminal), or you can hit `ALT-F2` which will bring you to a a prompt where you can type in `gnome-terminal` to have a graphics terminal. Alternatively if you have access to your launch/search button you can just type in `terminal` and click on the terminal button. You can also install reinstall ubuntu-desktop from the software center. However, you do it, should resolve the issue you describe. – L. D. James Oct 19 '14 at 20:32
  • I dont have Software Center :( – Andrews Gofmans Oct 19 '14 at 21:15
  • I thought the commandlines would be easier. That is why I made a reference to Software Center last. What do you get when you type in the command from the answer into there console from the `ALT-CTL-F2` login? Also what do you get if you run `ping -c100 8.8.8.8` from the same console login? – L. D. James Oct 19 '14 at 21:24
  • I somehow managed to get ubuntu desktop installed via commandline. Thank you very much everybody. I was really lost for some time. now I think I will be able to reinstall Linux and solve the rest of the problems. Thank you all!!! – Andrews Gofmans Oct 19 '14 at 21:41
0

Test this:

Switch On your PC.

Wait until the BIOS has finished loading.

Press and hold the Shift key, which will bring up the Grub menu.

Select the line which starts with: Advanced options.

Select the line ending with: Recovery mode, something like:

Ubuntu GNU/Linux, with Linux 3.16.0-21-generic (recovery mode)

Press Return.

Your PC should display a submenu with a number of options.

Select in this order:

fsck
network
root

Ubuntu wil boot in a terminal.

Run it:

mount -o remount,rw /
mount --all
dpkg --configure -a
apt-get -f install
apt-get update
apt-get dist-upgrade
apt-get install --reinstall ubuntu-desktop
apt-get clean
apt-get autoremove
reboot

Edited for explanations:

Why fsck?

Because sudo apt-get purge wine, it is not able to damage the system as reported, and it is possible there has been a failure to file system.

Why apt-get dist-upgrade?

Because sudo apt-get update, not install new packages, only updates that are already installed. And sudo apt-get dist-upgrade updates that are already installed and also installed new packages required to resolve dependencies.

kyodake
  • 15,052
  • 3
  • 40
  • 48
  • I don't think it's necessary to `fsck`. There's no hint that file systems were damaged. OP just removed to many packages. For more a more detailed description of (how to run) the recovery mode visit [its Ubuntu Wiki page](https://wiki.ubuntu.com/RecoveryMode). – David Foerster Oct 19 '14 at 20:23
  • Also `apt-get dist-upgrade` seems **dangerous** as a distribution upgrade is typically *irreversible* and you don't even mention its wide ranging effects. – David Foerster Oct 19 '14 at 20:27
  • @AndrewsGofmans The method you're saying you'll use to try this list of commands is the same method described in the first answer. The key to resolving your issue is `ubuntu-desktop`. As David said concerning the `fsck` it's unlikely that you will need the other commands. Just the `ubuntu-desktop` recovered. – L. D. James Oct 19 '14 at 20:36
  • Emm... Unfortunately I cannot get into recovery mode. So I cant really do that. And when I access terminal via ctrl+alt+F2 it cannot locate ubuntu desktop. I cannot access terminal via search as it doesnt show up there. – Andrews Gofmans Oct 19 '14 at 21:09