uninstall packages using dpkg
Solution 1
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
Solution 2
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.
Solution 3
One-liner to delete multiple packages with dpkg
by wildcard:
dpkg --list|grep openoffice|awk '{ print $2 }'|xargs sudo dpkg -r
Related videos on Youtube
![s.m](https://i.stack.imgur.com/XNHRP.jpg?s=256&g=1)
s.m
Updated on September 18, 2022Comments
-
s.m almost 2 years
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
-
carnendil over 11 yearsThe wild-card should work. Check whether you are typing
openoffice.org
oropenoffice-org
. Still, you would have to type the names of other packages, e.g.uno-libs3
,ure
-
s.m over 11 yearsIt 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нιη almost 10 yearsDid you test with
dpkg -r 'openoffice.org*'
? or evendpkg -r openoffice.org\*
? "also replaced '-' with '.' "
-
-
s.m over 11 yearsI 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
-
Frederik Spang over 11 yearsdpkg doesn't support wildcards. So you'll have to do so. Or copy my list.
-
αғsнιη almost 10 years@FrederikSpang Why
dpkg
not support wild cards ^^? do you have any proof or reason? -
Faizan Akram Dar over 9 yearsapt-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
-
h0ch5tr4355 over 8 yearsNot even for
apt-get install
internet is obsessive - local mirror e.g.