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

  • The wild-card should work. Check whether you are typing openoffice.org 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 'openoffice.org*'? or even dpkg -r openoffice.org\*? "also replaced '-' with '.' " – αғsнιη Sep 24 '14 at 6:13

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

| improve this answer | |

You can use

sudo apt-get purge openoffice.org-base-core openoffice.org-common openoffice.org-core openoffice.org-style-human uno-libs3 ure openoffice.org-thesaurus-en-au openoffice.org-thesaurus-en-us openoffice.org-hyphenation openoffice.org-hyphenation-en-us openoffice.org-l10n-common

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* openoffice.org-base-core* openoffice.org-calc* openoffice.org-common* openoffice.org-core* openoffice.org-draw* openoffice.org-emailmerge* openoffice.org-gnome* openoffice.org-gtk* openoffice.org-help-en-us* openoffice.org-impress* openoffice.org-math* openoffice.org-style-human* openoffice.org-writer* python-uno* wbritish*

Using above is the safe way.

| 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? – αғsнιη 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 Akram Dar 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

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.