Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

sudo apt-get remove --purge wine* opened the gates of hell and removed many things. I wasn't allowed to paste the output here, too big. I stopped the process, I wanted to save what's left of my system!

  1. How to reinstall what has been removed?
  2. Why were these packages removed? It is the most important question, why the hell were they removed? I can't see any relation between Spotify and wine!
  3. If apt-get --purge might destroy your system, how to remove wine then? I removed it from software center but many files were still there.
  4. Can you ever trust apt-get -- purge?

I'm on Xubuntu 14.04 64 bit.

share|improve this question
Hard to know if your problem was a typo or a bug. wine * is not the same as wine*. I suggest you now use wildcards with apt-get purge. Also, you should have gotten a warning before any critical packages were removed, I hope you did not ignore that. I suggest you run sudo apt-get install xubuntu-desktop – bodhi.zazen Apr 11 '14 at 22:47
@bodhi.zazen well sudo apt-get install xubuntu-desktop but it says E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/cache/apt/archives/ – Lynob Apr 11 '14 at 22:49
You have to close any other package managers running, including software center first. – bodhi.zazen Apr 11 '14 at 22:50
Also, the --purgeflag doesn't destroy a system by itself; it just removes configuration files from the packages removed by the command. – saiarcot895 Apr 11 '14 at 22:51
Based on Note, selecting 'libapache2-mod-auth-ntlm-winbind' for regex 'wine*', it saw that the package name contained "win" ("e*" means 0 or more instances of "e") and removed it. Then, the dominoes fell... (This is also why a list of packages to be removed is displayed for review before you enter yes.) – saiarcot895 Apr 11 '14 at 22:53
up vote 0 down vote accepted

Uninstall did this, not purge. Don't feel bad, I think we've all done it at one point in time or another.

Run the command again, however, this time run the command

sudo apt-get purge wine

without the * mark and this time, submit "n" to not uninstall at this time. Now, before you execute the command again, you should take note of the list of programs that will be uninstalled along with wine so you may reinstall these programs after the purge and before the next reboot.

I like to make a copy of this list that can be pasted into a text editor. Once copied into the text editor, you can remove all the paragraphs and * marks to make a smooth list that can be copied and pasted after a sudo apt-get install command to run immediately after the purge is done. Luckily, programs like Spotify retain their configuration files during this process as they were not explicitly marked to purge, only to uninstall so when you re-install them they should be good as new.

share|improve this answer
Also, take a look here‌​ning-text-win?rq=1 to see how to find out what applications already have been uninstalled so you can reinstall them. – mchid Apr 11 '14 at 23:43
adding " > output.txt" to the end of the command will write the output of that command to that output.txt file. – Goksu Jul 9 '14 at 18:35

Aside from @mchid's correct answer, the command you should've used was

sudo apt-get remove wine\* 

Notice the backslash. It instructs the shell not to open the wildcard, and pass it to apt-get as is instead. What happened is that your shell interpreted the wine* and passed a whole lot of package names for apt-get to remove, instead of just the ones you expected.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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