How to Remove LibreOffice from Ubuntu

Tech reviewed: Deepak Prasad
Ubuntu desktop removing LibreOffice suite packages with apt purge and cleanup steps

LibreOffice is the default office suite on many Ubuntu Desktop installs—Writer, Calc, Impress, and related apps shipped as APT packages. On Ubuntu Server or minimal images it is usually not installed until you add it. If you want a slimmer system, fewer background integrations, or a different office app, you need to remove LibreOffice from Ubuntu in a way that drops binaries, menu entries, and dependency libraries—not just the main metapackage name.

This guide shows how to completely remove LibreOffice on Ubuntu: find what is installed, apt remove vs apt purge, the quoted 'libreoffice*' wildcard, autoremove for libuno and ure, user config under ~/.config/libreoffice, and the graphical App Center path. I installed libreoffice-core and libreoffice-writer on Ubuntu 25.04 for testing (this host had no LibreOffice at first), then purged and verified leftovers. Desktop systems with the full metapackage follow the same purge commands with more packages in the removal list.

Tested on: Ubuntu 25.04 (Plucky Puffin); kernel 6.14.0-37-generic.

IMPORTANT
Quote the wildcard: use 'libreoffice*', not bare libreoffice*. In a directory with local files matching the pattern, an unquoted glob can expand in the shell before apt runs.

Quick command summary

Task Command
Check if installed apt-cache policy libreoffice
List LibreOffice packages dpkg -l | grep -i libreoffice
Remove (keep config) sudo apt remove 'libreoffice*'
Completely remove (recommended) sudo apt purge -y 'libreoffice*'
Preview purge (dry run) sudo apt purge -s 'libreoffice*'
Drop orphaned dependencies sudo apt autoremove -y
Clear apt download cache sudo apt autoclean
Delete user settings rm -rf ~/.config/libreoffice
Remove Snap build sudo snap remove libreoffice
Remove Flatpak build flatpak uninstall org.libreoffice.LibreOffice
Confirm gone dpkg -l | grep -i libreoffice
Find desktop entry package dpkg -S /usr/bin/libreoffice

Is LibreOffice installed on your Ubuntu system?

Ubuntu Desktop ISOs typically include the libreoffice metapackage. Server and cloud images do not unless you installed a desktop stack later.

Check from the terminal:

bash
apt-cache policy libreoffice
dpkg -l | grep -i libreoffice | head
command -v libreoffice

On my test host before install:

text
libreoffice:
  Installed: (none)
  Candidate: 4:25.2.7-0ubuntu0.25.04.1

No dpkg lines and no libreoffice on PATH—typical for a server-style system. If you need a throwaway install to practice removal:

bash
sudo apt update
sudo apt install -y libreoffice-core libreoffice-writer

That pulled 46 packages (~327 MB) on Ubuntu 25.04, including libreoffice-common (which owns /usr/bin/libreoffice), libreoffice-core, libreoffice-writer, and python3-uno.


What you are removing

LibreOffice on Ubuntu is split across many APT names:

Package type Examples Notes
Metapackage libreoffice Pulls Writer, Calc, Impress, Draw, Math, Base on full desktop installs
Applications libreoffice-writer, libreoffice-calc, … Individual components
Core / common libreoffice-core, libreoffice-common Engine and /usr/bin/libreoffice wrapper
Dependencies libuno-*, ure, uno-libs-private UNO runtime—not matched by libreoffice*

Find which package owns the launcher:

bash
dpkg -S "$(command -v libreoffice)"
text
libreoffice-common: /usr/bin/libreoffice

If you remove LibreOffice to save space before installing OnlyOffice or another suite, the must-have Ubuntu apps list covers common replacements from apt and Snap.

For general uninstall patterns (purge vs remove, Snap, Flatpak), see how to remove software on Ubuntu.


Find how LibreOffice was installed (apt, Snap, or Flatpak)

apt and snap can both report LibreOffice as not installed while the app still opens from the menu. That usually means it came from a different channel than the one you are trying to remove.

Ubuntu App Center often lists two entries—an APT package and a Snap—and you may also have a Flatpak install or a manual .deb from libreoffice.org. Run every check below before you purge so you match the uninstall command to how the suite was actually installed.

Run all three checks before you purge:

bash
apt-cache policy libreoffice
dpkg -l | grep -i libreoffice | head
snap list | grep -i libre
flatpak list --app | grep -i libre
command -v libreoffice
What you see Remove with
dpkg rows with ii sudo apt purge -y 'libreoffice*' (see below)
libreoffice in snap list sudo snap remove libreoffice
Flatpak app ID flatpak uninstall org.libreoffice.LibreOffice
libobasis* / libreoffice7.* packages Manual LibreOffice .deb install—purge 'libreoffice*' and libobasis*

Ubuntu 24.04 minimal installs may not include LibreOffice until you add it. Full desktop images usually ship the APT metapackage; Snap is optional through App Center.


Remove LibreOffice on Ubuntu (keep configuration)

Use apt remove when you might reinstall soon and want to keep system config stubs:

bash
sudo apt remove 'libreoffice*'

That drops program files but may leave rc rows in dpkg -l for some components. For a one-way uninstall, skip straight to purge below.


Step 1: Preview the purge (optional)

Simulate the purge first so you see what else apt might touch:

bash
sudo apt purge -s 'libreoffice*' 2>&1 | grep -v 'is not installed' | tail -20

Read the REMOVING list. If a package you still need appears, stop and purge individual libreoffice-* names instead.

Step 2: Purge all libreoffice* packages

bash
sudo apt purge -y 'libreoffice*'

On my test run after reinstalling core + writer, apt targeted 10 packages (~287 MB):

text
The following packages will be REMOVED:
  libreoffice-base-core* libreoffice-common* libreoffice-core*
  libreoffice-math* libreoffice-style-colibre* libreoffice-uiconfig-common*
  libreoffice-uiconfig-math* libreoffice-uiconfig-writer* libreoffice-writer*
  python3-uno*
0 upgraded, 0 newly installed, 10 to remove and 38 not upgraded.
After this operation, 287 MB disk space will be freed.
Removing libreoffice-writer (4:25.2.7-0ubuntu0.25.04.1) ...
Removing libreoffice-core (4:25.2.7-0ubuntu0.25.04.1) ...
Removing libreoffice-common (4:25.2.7-0ubuntu0.25.04.1) ...
Purging configuration files for libreoffice-common (4:25.2.7-0ubuntu0.25.04.1) ...
Purging configuration files for libreoffice-core (4:25.2.7-0ubuntu0.25.04.1) ...

You may see harmless rmdir messages under /var/lib/libreoffice during purge—that is normal when directories were already empty.

Step 3: Quiet the “not installed” noise

Apt also matches hundreds of language packs and optional modules in the index. Expect lines like:

text
Package 'libreoffice-l10n-de' is not installed, so not removed
Package 'libreoffice-help-en-gb' is not installed, so not removed

Those are not errors. To hide them when capturing output:

bash
sudo apt purge -y 'libreoffice*' 2>&1 | grep -v 'is not installed'

Step 4: Autoremove UNO / URE dependencies

libreoffice* does not remove libuno-*, ure, or uno-libs-private. After purge, apt usually suggests:

text
The following packages were automatically installed and are no longer required:
  fonts-opensymbol libabw-0.1-1 ... libuno-cppu3t64 ... uno-libs-private ure
Use 'sudo apt autoremove' to remove them.

Preview, then run:

bash
sudo apt autoremove --dry-run
sudo apt autoremove -y

On my host autoremove dropped 36 packages (~40 MB), including fonts-opensymbol and other libraries only LibreOffice needed. See also remove unused packages on Ubuntu.

Clear cached .deb files if you want to reclaim a little more disk after a large removal:

bash
sudo apt autoclean

Step 5: Purge rc configuration leftovers

If you used apt remove earlier, dpkg -l may show rc rows (config only). Finish cleanup:

bash
dpkg -l | awk '/^rc/ && /libreoffice/ {print $2}'
sudo apt purge $(dpkg -l | awk '/^rc/ && /libreoffice/ {print $2}')

Step 6: Delete personal configuration

Package purge does not touch your home directory:

bash
rm -rf ~/.config/libreoffice

Remove local templates or macros only if you stored them outside that path.

Step 7: Verify complete removal

bash
dpkg -l | grep -i libreoffice
ls /usr/share/applications/*libreoffice* 2>/dev/null
command -v libreoffice

After a full purge + autoremove on my system:

text
(no dpkg matches)
(no desktop files)
(no command on PATH)

Remove LibreOffice from Ubuntu App Center (GUI)

On Ubuntu Desktop:

  1. Open Ubuntu Software or App Center.
  2. Go to Installed (or search LibreOffice).
  3. Click Uninstall on LibreOffice.

The GUI typically runs apt remove on the libreoffice metapackage. For the same depth as the terminal path, follow up with:

bash
sudo apt purge -y 'libreoffice*'
sudo apt autoremove -y
rm -rf ~/.config/libreoffice

Remove LibreOffice Snap on Ubuntu

App Center can list both APT and Snap builds of LibreOffice. apt purge does not remove the Snap copy—you need a separate snap remove when that channel is installed.

bash
snap list | grep -i libre
sudo snap remove libreoffice

Verify:

bash
snap list | grep -i libre || echo "snap removed"
ls ~/snap/libreoffice 2>/dev/null || echo "no snap data dir"

Snap data under ~/snap/libreoffice may linger until you remove the snap; delete that directory only if you are sure you will not reinstall the Snap.


Remove LibreOffice Flatpak on Ubuntu

bash
flatpak list --app | grep -i libre
flatpak uninstall org.libreoffice.LibreOffice
flatpak uninstall --unused

Remove LibreOffice installed from libreoffice.org (.deb)

If you installed the upstream .deb bundle (common when replacing distro packages with a newer LibreOffice), package names often look like libreoffice7.6* and libobasis* instead of the plain libreoffice metapackage:

bash
dpkg -l | grep -E 'libobasis|libreoffice[0-9]'
sudo apt purge -y 'libreoffice*' 'libobasis*'
sudo apt autoremove -y

Another minimal path is purging libreoffice-common first, then running autoremove—the wildcard above is broader and matches more installs.


Remove LibreOffice with Synaptic (GUI)

Synaptic offers the same complete removal as apt purge through a graphical package list:

bash
sudo apt install -y synaptic
sudo synaptic

Search libreoffice, mark libreoffice or libreoffice-common for Complete Removal, apply, then run sudo apt autoremove in a terminal. Synaptic mirrors apt purge but still benefits from the autoremove and ~/.config/libreoffice cleanup steps above.


Remove only one LibreOffice app

To drop Writer but keep Calc, purge a single package:

bash
sudo apt purge libreoffice-writer
sudo apt autoremove -y

Purging libreoffice-calc, libreoffice-impress, or others works the same way. To remove the whole suite, use 'libreoffice*' or purge the libreoffice metapackage on desktop systems where it is installed:

bash
sudo apt purge libreoffice
sudo apt autoremove -y

Use sudo and apt the same way you would for any other metapackage.


Alternatives after uninstall

If you still need to edit documents locally:

Option Install sketch
OnlyOffice Desktop Download .deb from OnlyOffice or use Snap
AbiWord sudo apt install abiword (lightweight writer)
GNOME Office sudo apt install gnumeric abiword
Web Google Docs / Microsoft 365 in the browser

Install the replacement before you purge if this machine must stay productive during the change.


Troubleshooting

Symptom Likely cause Fix
Hundreds of “not installed” lines Wildcard matches all archive names Ignore or grep -v "is not installed"
libuno / ure still present Not matched by libreoffice* sudo apt autoremove -y
LibreOffice still in app menu Partial remove or GNOME cache Purge 'libreoffice*'; log out and back in
libreoffice: command not found but packages remain Wrapper removed, libs left dpkg -l | grep libreoffice; purge stragglers
Unquoted glob removed wrong files Shell expanded libreoffice* in CWD Always quote: 'libreoffice*'
zsh: no matches found: libreoffice* zsh globbing before apt runs Use 'libreoffice*' or libreoffice\*
rc rows in dpkg -l Used remove not purge sudo apt purge <package> on each rc name
apt says not installed, app still opens Snap, Flatpak, or manual .deb See Find how LibreOffice was installed
Purged apt but menu icon remains Snap copy still installed sudo snap remove libreoffice
fonts-opensymbol left after purge Optional font dep sudo apt autoremove -y (safe if nothing else needs it)

References


Summary

To remove LibreOffice from Ubuntu, first identify the install channel—apt, Snap, Flatpak, or a manual libreoffice.org .deb. For archive packages, run sudo apt purge -y 'libreoffice*' with the wildcard quoted, then sudo apt autoremove -y and sudo apt autoclean. Run sudo snap remove libreoffice or flatpak uninstall when those channels apply. Delete ~/.config/libreoffice for user settings. Confirm with dpkg -l | grep -i libreoffice and snap list—no matches means you are done on those channels.


Frequently Asked Questions

1. Is LibreOffice installed by default on Ubuntu?

On Ubuntu Desktop it is usually preinstalled as the libreoffice metapackage. Ubuntu Server and minimal images do not include it. Run dpkg -l libreoffice or apt-cache policy libreoffice to see whether your system has it.

2. What is the fastest way to remove LibreOffice on Ubuntu?

Run sudo apt purge libreoffice* with the asterisk quoted as libreoffice* so the shell does not expand it locally. Then sudo apt autoremove -y to drop UNO, URE, and other dependencies that are no longer needed.

3. What is the difference between apt remove and apt purge for LibreOffice?

apt remove deletes program files but can leave configuration marked rc in dpkg. apt purge also deletes system configuration under /etc for those packages. Use purge when you want a clean uninstall and do not plan to reinstall soon.

4. Why does apt print hundreds of libreoffice packages not installed?

The libreoffice* wildcard matches every language pack and optional component name in the archive, including packs you never installed. Apt reports is not installed, so not removed for each one. Filter with grep -v "is not installed" or ignore the noise.

5. Why are libuno and ure still installed after purging LibreOffice?

Those packages do not start with libreoffice. They are dependencies pulled in by libreoffice-core. After purge, run sudo apt autoremove -y to remove them when nothing else depends on them.

6. How do I delete LibreOffice settings and user data on Ubuntu?

Remove the directory rm -rf ~/.config/libreoffice after you purge the packages. That drops personal toolbars, templates path settings, and recovery data for your user only.

7. Can I uninstall LibreOffice from the Ubuntu GUI?

Yes. Open Ubuntu Software or App Center, go to Installed, search LibreOffice, and click Uninstall. That calls the same APT backend as sudo apt remove libreoffice—you may still want purge and autoremove in the terminal for a complete cleanup.

8. What office suite can I use after removing LibreOffice on Ubuntu?

Install OnlyOffice, FreeOffice, AbiWord, or use web apps. For a lightweight writer only, apt install abiword is enough. Pick one alternative before you purge if you still need to open docx files locally.

9. Why does apt say LibreOffice is not installed but the app still opens?

You may have the Snap or Flatpak build, or a manual .deb from libreoffice.org, while apt only tracks Ubuntu archive packages. Run snap list, flatpak list, and dpkg -l | grep -i libreoffice to find the real source, then remove from that channel.

10. Does zsh break sudo apt purge libreoffice*?

Yes. zsh tries to expand the glob before apt runs and can print no matches found. Quote the pattern as libreoffice* or escape the asterisk as libreoffice\* so apt receives the wildcard.
Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with over a decade of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels across development, DevOps, …

  • Red Hat Certified System Administrator in Red Hat OpenStack
  • Certified Kubernetes Application Developer (CKAD)
  • Red Hat Certified Specialist in Ansible Automation
  • Go (programming language)
  • Python (programming language)
  • DevOps
  • Computer Security