Which package should I remove to completely remove libreoffice? I have no need for office tools.

That's the one gripe I have with package managers like apt, there's no simple way to perform the essential task of removing unwanted software :S

  • 3
    Seriously... Why they assume that we all need office software when we install Gnome? There should be separate checkbox in tasksel...
    – Kamil
    Commented Nov 25, 2020 at 15:01
  • 1
    This question cannot be upvoted enough! What a waste of hundreds of megabytes of space for something most people will never use. Commented Nov 16, 2022 at 15:29

12 Answers 12


Type the following in terminal to remove libreoffice:

sudo apt-get remove --purge "libreoffice*"
sudo apt-get clean
sudo apt-get autoremove
  • @EliahKagan but clean wipes of the packages through which the software was downloaded. The unnecesary ones
    – Kitizl
    Commented Jan 15, 2013 at 9:44
  • 2
    @Kitizl It deletes the .deb files in /var/cache/apt/archives, yes. Commented Jan 15, 2013 at 9:45
  • 3
    Use this sudo apt-get remove --purge libreoffice-common Commented Dec 6, 2014 at 15:25
  • 12
    @Shoully that would be handled by the accepted answer's libreoffice*
    – chrisan
    Commented Dec 28, 2014 at 0:23
  • 29
    the command in zsh: sudo apt-get remove --purge libreoffice\*
    – Timo
    Commented Mar 4, 2018 at 13:21

An especially thorough removal technique.

Suitable generally, but especially when removing LibreOffice to replace it with a manually installed LibreOffice or OpenOffice.

Assuming LibreOffice is provided by official Ubuntu packages on your system (which it generally is, unless you've installed it yourself from other packages or from the LibreOffice website), you can thoroughly remove it in the Terminal:

sudo apt-get remove fonts-opensymbol libreoffice libreoffice-\* openoffice.org-dtd-officedocument1.0 python\*-uno uno-libs3-\* ure ure-dbg

If you want to remove global configuration files too (this does not affect per-user configuration in users' home directories), replace remove with purge.

I think it's unlikely that removing any of this will break other programs, because Lubuntu doesn't come with LibreOffice, and Lubuntu users are able to run just about any Ubuntu program, without having to install LibreOffice.

Still, that is a legitimate concern and I cannot guarantee that nothing depends on your existing LibreOffice installation. Fortunately, the most serious breakages can be averted by making sure that nothing you need is removed with the LibreOffice packages. You can either be very careful while running the removal command (watch out for whatever else it says will be uninstalled), or simulate the removal first:

apt-get -s remove fonts-opensymbol libreoffice libreoffice-\* openoffice.org-dtd-officedocument1.0 python\*-uno uno-libs3-\* ure ure-dbg

(That is, put -s right after apt-get, and, optionally, remove the sudo.)

I haven't heard about any problems arising from removing fonts-opensymbol but those are fonts, and not enough people remove the package to know if problems viewing documents are common. So if the simulation reveals that a number of other packages you need or are unfamiliar with would be removed, try simulating without removing fonts-opensymbol and see what happens. And you might decide just not to remove that one at all.

The above technique uninstalls all LibreOffice packages provided in Ubuntu. I got the list of packages from here.

To shorten the command and avoiding having to type the name of every individual package, and also potentially to extend the life of this procedure in case differently named packages are provided in later versions of LibreOffice, I used the * wildcard to cover many packages at once. It is itself escaped with \ so that it won't be expanded by the shell into the name of some unrelated file or directory, before it is passed on to apt-get.

Related: How to replace LibreOffice with OpenOffice?

  • 1
    apt-get uses regular expressions rather then wildcards, so to use a "wildcard" you should type '.*' (remember to escape * in the shell or else the shell will expand it to filenames you don't want). The libreoffice-\* worked only as a coincidence because apt-get uses partial match on regex (equivalent to '^.*libreoffice-*.*$') instead of full string match (i.e. '^libreoffice-*$').
    – Explorer09
    Commented Mar 20, 2018 at 2:11

Here's another way I found (at libre-software.net):

To remove prior installations of LibreOffice:

sudo apt-get remove libreoffice-core

If you also want to remove LibO configuration files, use the purge switch:

sudo apt-get remove --purge libreoffice-core

So, by "main package", gemue2010 probably meant "libreoffice-core". The "clean" and "autoremove" arguments to apt-get that karthick87 provided are always a good idea.

While I appreciate the command-line (terminal) as much as the next enthusiast, I like having a GUI front-end alternative, a mouse-only solution to trivial matters. In this case, in Synaptic, you can mark the libreoffice-core package for complete removal, and it offers to remove the following additional (related/dependant) packages as well:

libreoffice-base libreoffice-base-core libreoffice-calc libreoffice-draw libreoffice-gnome libreoffice-gtk libreoffice-help-en-us libreoffice-impress libreoffice-math libreoffice-ogltrans libreoffice-pdfimport libreoffice-presentation-minimizer libreoffice-writer python3-uno

Disclaimer: I'm not a seasoned linux user, in fact I'm new to this world. I realize this method may not be satisfactory to some, and this answer may come too late to be of any use to the original asker, but I'm only sharing my findings in hopes they will be of use to others looking for something like this. So while this method might not remove all associated packages, some of which have been mentioned, it seems safer and good enough at removing most of the packages, to me, so maybe for others as well. Lastly, a note: in my case, mint-meta-xfce is also among the packages to be removed.


As a corollary, you can use aptitude to search for which packages to uninstall:

aptitude search '~i' | grep libreoffice

which returns a list of all installed packages that contain the text 'libreoffice'. Grep is neat!

Then use apt-get to remove the main package that you have installed, and apt-get autoremove will remove all the smaller packages which are no longer necessary. Hope that piece of advice helps!

  • 1
    To remove LibreOfficeDev: aptitude search '~i' | grep -o '(lodev|libreofficedev)\S*' | xargs sudo apt-get remove -y Commented Nov 6, 2018 at 20:13
  • Not sure what the main package was installed by default with the Mint 20 distro, but this nuked LO6: aptitude search '~i' | egrep -o '(libreoffice-\S*)' | xargs sudo apt-get remove -y Commented Dec 23, 2020 at 3:41

In 16.04+ removing this is slightly easier. You only need to issue one slightly different command. I should add the old way still works as well if you like using it.

sudo apt purge "libreoffice*"
  • You need to quote that, "sudo apt purge libreoffice*" Commented Oct 17, 2017 at 9:33
  • 1
    I think what @DanDascalescu meant was you need to quote this way "libreoffice*" or the * will not be used properly.
    – bomben
    Commented Jun 24, 2018 at 11:45

On newer Ubuntu versions (16.04+, maybe earlier), just to provide an up-to-date answer (the others work too):

sudo apt purge -y libreoffice*

This does the whole job, including autoremove and stuff.

  • You might have to double-quote "libreoffice*" Commented Oct 17, 2017 at 9:40

Use synaptic manager. Just download it, and mark for uninstall.

sudo apt-get update
sudo apt-get install synaptic

After installation, open synaptic manager as superuser.

sudo synaptic

Now, find LibreOffice in the search bar. Right click, and choose "mark for complete installation".

After that, click "apply" in the menu bar. Done 1


Hmm, the easiest way should be to use the software manager. uninstall libre-office from there. if you didnt manualy installed certain by libre-office needed libs (uno, ure) those libs will be also uninstalled automaticaly.

  • +1 for simplicity. I'd always use apt-get remove or apt-get remove --purge myself, but if someone's convinced there's "there's no simple way to perform the essential task of removing unwanted software" they really can't ask for simpler than clicking the remove button.
    – Jon Hanna
    Commented Apr 28, 2014 at 23:34

This will uninstall ALL libreoffice packages in ubuntu 16.04

sudo apt-get autoremove -y libreoffice-\*


With zsh this doesn't work:

sudo apt-get remove --purge libreoffice*

it gives this zsh: no matches found: libreoffice*

This does work:

sudo apt-get remove --purge libreoffice\*

To uninstall it on Fedora:

sudo dnf remove -y libreoffice* libobasis*

To also remove the user profile:

rm -rf /home/$USER/.config/libreoffice

To completely remove LibreOffice with all its dependencies:

sudo apt-get remove --purge -y libreoffice*

Remove the unneeded packages that were once installed as a dependency for it:

sudo apt-get autoremove

Remove the retrieved packages from the local cache:

sudo apt-get autoclean

Check that it was completely removed:

dpkg --list | grep libreoffice*

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .