How to remove LibreOffice installed with Lubuntu 20.04

7,161

Solution 1

Basically, it's apt purge libreoffice-common.

You should be able to get almost full list of related packages with dpkg -S /usr/lib/libreoffice. At first glance it looks like all of them are safe to apt purge. List of packages that were first "level" for Lubuntu:

$ apt depends lubuntu-desktop | grep libreoffice

  Recommends: libreoffice-calc
  Recommends: libreoffice-gtk3
  Recommends: libreoffice-impress
  Recommends: libreoffice-qt5
  Recommends: libreoffice-style-breeze
  Recommends: libreoffice-writer

Solution 2

Firstly I'll apologize for the errors I missed in my answer on Easy fix for LibreOffice Impress font problems on Lubutu 20.04?. I have corrected it.

To remove the additional packages you need to run

sudo apt remove libreoffice-core libreoffice-common libreoffice-style-breeze
sudo apt autoremove

I'm not removing every package... via command hoping for the rest being removed when the autoremove is performed. I'd executed that later because they were left, but had failed to copy those packages into my prior answer, for which I'll apologize again. Sorry.

Share:
7,161

Related videos on Youtube

John
Author by

John

Updated on September 18, 2022

Comments

  • John
    John over 1 year

    I found a problem with the way the default install of LibreOffice Impress handles fonts on Lubuntu 20.04. That problem is covered here. In short, the solution was to remove the default install of LibreOffice (the one that gets installed by installing Lubuntu) and installing the snap version of LibreOffice.

    Wanting to keep my system nice and clean, I wanted to remove the existing (default) LibreOffice. I tried:

    sudo apt remove libreoffice
    

    I also tried various versions of the above, including --purge, etc. However, it kept saying that LibreOffice was not installed, so it would not remove it.

    Eventually, I found the software center for Lubuntu (my main machine is Ubuntu). There I could remove, individually, Calc, Impress, Writer, etc. However, there was nothing to remove the over-arching app of LibreOffice.

    To be clear, that over-arching shell is still there. I can launch it but it cannot read any files because Impress, etc. are all gone. However, it's still there and I would like to remove it.

    I found a lot of help at my other question, including this answer which indicated I should be able to use:

    sudo apt remove libreoffice-base-core
    sudo apt autoremove
    

    This did not work as apt does not see that LibreOffice is installed.

    Package 'libreoffice-base-core' is not installed
    

    I then tried this, based on advice from that answer:

    dpkg -l |grep "ii libre"
    

    It returns nothing at all.

    I don't see a way to remove the default install of LibreOffice, which I do not need because the snap version is working well.

    When I type in:

    whereis libreoffice
    

    I get:

    libreoffice: /usr/bin/libreoffice /usr/lib/libreoffice /etc/libreoffice /usr/share/libreoffice /snap/bin/libreoffice.draw /snap/bin/libreoffice /snap/bin/libreoffice.math /snap/bin/libreoffice.base /snap/bin/libreoffice.calc /snap/bin/libreoffice.impress /snap/bin/libreoffice.writer /snap/bin/libreoffice.filebug /usr/share/man/man1/libreoffice.1.gz
    

    Can I simply delete everything named libreoffice* everywhere outside of /snap/bin/? Will that break anything?

    • int_ua
      int_ua almost 4 years
      apt purge libreoffice-common?
    • wxl
      wxl almost 4 years
      apt-cache show lubuntu-desktop | grep libreoffice will show you all the LO packages installed with Lubuntu.
    • guiverc
      guiverc almost 4 years
      I'm very sorry; two key packages were missing from my removal (apt remove libreoffice-core libreoffice-common libreoffice-style-breeze) and lo.styles... I've corrected
    • John
      John almost 4 years
      @int_ua Your common was the correct answer. That one line finally got rid of everything. If you change your answer to what you wrote in your comment, I will mark that correct.
    • int_ua
      int_ua almost 4 years
      Done. Thank you, John, and thank you, guiverc. Oh, and wxl too :)
  • John
    John almost 4 years
    Nailed it! Actually, I only needed "libreoffice-common" to be removed and the rest with with it.
  • guiverc
    guiverc almost 4 years
    :) but also :( for me... I'd aimed to use the minimal number of packages (I should have looked at the seed files but didn't) and yours (libreoffice-common is better than mine. If you want to write it up as an answer; I'll delete this answer. (and Well done !!)
  • John
    John almost 4 years
    int_ua had the magic. Since he's updated his answer ( to match his original comment), I've accepted that as the correct one. You can delete this one. Thanks for all your help (and good luck testing 20.10).