Need clarification on the pre-installed LibreOffice package

I prefer using the Flathub release (also the Flatpak is verified by anyway).

If I want to remove the Fedora package with NO LEFTOVERS, what is the ideal way of doing so?

I’ve seen these two commands from various sources. Do they behave any differently from each other?

sudo dnf remove -y libreoffice*


sudo dnf group remove -y libreoffice

Yes a little bit.

LibreOffice is installed via group.
(It’s strange that LibreOffice is explicitly marked since it’s in Fedora Workstation env group anyway.)

$ dnf repoquery --installed --qf='%{name} (&{reason})' libreoffice*
libreoffice-calc (group)

$ dnf group list --installed
Installed Groups:

$ dnf group info LibreOffice
Group: LibreOffice
 Description: LibreOffice Productivity Suite
 Mandatory Packages:
 Optional Packages:

sudo dnf remove -y libreoffice* removes all packages installed in the group, but does not remove the group.
sudo dnf group remove -y libreoffice removes the group. It should remove the packages, but unoconv in the @workstation-product (Why… :melting_face:) depends on libreoffice-* stuff so they become dependency instead.

$ dnf repoquery --installed --whatdepends libreoffice-calc
$ dnf repoquery --installed --whatdepends libreoffice-filters
$ dnf repoquery --installed --whatdepends unoconv

$ sudo dnf remove @libreoffice
$ dnf repoquery --installed --qf='%{name} (&{reason})' libreoffice*
libreoffice-calc (dependency)

Nothing depends on unoconv so that can be uninstalled to make all the dependencies go away.

So, I would just do this to kinda peel things off correctly:

$ sudo dnf remove unoconv
$ sudo dnf remove @libreoffice
1 Like

That was apparently added for gnome-documents, which is long dead. It probably could be dropped now.


So then I assume @libreoffice is just a shorthand for specifying that the input passed to dnf is a group name.

(I’m still quite new to Fedora and DNF)

I almost forgot to mention. Some guides/answers I saw included the command sudo dnf remove libreoffice-core.

This package isn’t mentioned in your reply. Can I include this? Or perhaps I should run autoremove as the last command to wipe leftovers?


$ dnf -v group info "LibreOffice"
 Group-Id: libreoffice

dnf removes dependencies by default[2], libreoffice-core is already in the removed dependencies list (last time I checked).

  1. @<group-spec> ↩︎

  2. If clean_requirements_on_remove is enabled (the default), also removes any dependencies that are no longer needed. ↩︎