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

I want to uninstall openoffice package and want to do this using single command or regular expression i.e

dpkg -r openoffice-org*

but dpkg doesnot accept wild cards

how can i uninstall all the packages using wildcard

share|improve this question
The wild-card should work. Check whether you are typing or openoffice-org. Still, you would have to type the names of other packages, e.g. uno-libs3, ure – carnendil Mar 21 '13 at 15:12
It doesnot work I have tried to remove evolution using sudo dpkg -P evolution* dpkg warning: ignoring request to remove evolution* which isn't installed – s.m Mar 21 '13 at 15:16
Did you test with dpkg -r '*'? or even dpkg -r\*? "also replaced '-' with '.' " – Afshin Hamedi Sep 24 '14 at 6:13

You can use

sudo apt-get purge uno-libs3 ure

to purge the packages.

Running the wildcard will remove following too:

aspell* aspell-en* dictionaries-common* hunspell-en-ca* hunspell-en-us* language-support-en* language-support-writing-en* myspell-en-au* myspell-en-gb* myspell-en-za************** python-uno* wbritish*

Using above is the safe way.

share|improve this answer
I tried apt-get but when I tried that it tries to connect to internet and also install other packages , but i want to perform this where there is no internet connection. Also I can remove openoffice packages using dpkg -P package1 package2 package3 , but I want to remove packages without having to type all the package names – s.m Mar 21 '13 at 14:57
dpkg doesn't support wildcards. So you'll have to do so. Or copy my list. – Frederik Spang Mar 21 '13 at 18:23
@FrederikSpang Why dpkg not support wild cards ^^? do you have any proof or reason? – Afshin Hamedi Sep 24 '14 at 6:12
apt-get will try to access internet only when you use apt-get install or apt-get update , etc but apt-get remove --purge doesnt need internet access – Faizan Mar 4 '15 at 12:32
Not even for apt-get install internet is obsessive - local mirror e.g. – h0ch5tr4355 Nov 9 '15 at 11:19

Actually dpkg does not support wildcards So if you need that feature you need this

dpkg --get-selections | grep "open-office" >list.txt

this file contains package and status you need to parse it and then feed to dpkg

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.