sodcalculator

10 Tech How-To

Install LibreOffice 5 on Ubuntu: Step-by-Step

Guide 10-51279 · Updated · Step by step

To install LibreOffice 5 on Ubuntu, you can use the terminal command sudo apt install libreoffice, which installs the version available in your Ubuntu repositories. If you need the exact 5.x series on older Ubuntu releases, you must add the official LibreOffice PPA or download the .deb package from the LibreOffice website.

Why You Might Want LibreOffice 5 Specifically

LibreOffice 5 was released in August 2015 and introduced a refreshed interface, better interoperability with Microsoft Office formats, and improved performance. Most modern Ubuntu versions (18.04 and later) ship with LibreOffice 6 or 7, so if you specifically need version 5—perhaps for compatibility with an extension, a macro, or a corporate standard—you cannot get it from the default repositories. You have two main paths: use the LibreOffice PPA (which may still offer 5.x for older releases) or download the standalone .deb package from the official archive. Note that LibreOffice 5 is end-of-life and no longer receives security updates, so using it on an internet-connected machine carries risk.

Method 1: Install from Ubuntu Repositories (Simplest)

For most users, the default repository version is the best choice. It is stable, integrates with the system update manager, and receives security patches. To install it:

  1. Open a terminal (Ctrl+Alt+T).
  2. Run sudo apt update to refresh the package list.
  3. Run sudo apt install libreoffice.
  4. Enter your password when prompted and confirm the installation.

This installs the full suite (Writer, Calc, Impress, Draw, Math, Base). If you want a lighter install, you can install individual components like libreoffice-writer or libreoffice-calc.

Method 2: Using the Official LibreOffice PPA

The LibreOffice team maintains a Personal Package Archive (PPA) that offers newer versions than the Ubuntu repositories. For older Ubuntu releases that originally shipped with LibreOffice 5, the PPA may still have the 5.x branch. To add and install from the PPA:

  1. Run sudo add-apt-repository ppa:libreoffice/ppa.
  2. Run sudo apt update.
  3. Run sudo apt install libreoffice.

If you are on a newer Ubuntu (e.g., 20.04 or later), the PPA will give you LibreOffice 7.x, not 5.x. To force version 5, you would need to specify the version number, but that is not straightforward with apt. The PPA is useful for getting the latest stable release, not for pinning an old one.

Method 3: Download the .deb Package from LibreOffice

If you must have exactly LibreOffice 5.4 (the last 5.x release), you can download the .deb package from the official LibreOffice download archive. Steps:

  1. Go to https://download.documentfoundation.org/libreoffice/old/ and choose the 5.4.7 version.
  2. Select your architecture (usually deb/x86_64 for 64-bit systems).
  3. Download the LibreOffice_5.4.7_Linux_x86-64_deb.tar.gz file.
  4. Extract it: tar -xzf LibreOffice_5.4.7_Linux_x86-64_deb.tar.gz.
  5. Enter the extracted directory and run sudo dpkg -i *.deb to install all packages.

This method bypasses the package manager’s dependency resolution, so you may need to install missing dependencies manually. Also, the installed version will not receive updates and may conflict with system libraries on newer Ubuntu releases.

Common Problems and How to Fix Them

  • Dependency errors when using .deb: Run sudo apt --fix-broken install to resolve missing dependencies.
  • LibreOffice does not launch after installation: Try launching from the terminal with libreoffice to see error messages. Often, reinstalling with sudo apt --reinstall install libreoffice-core helps.
  • Menu items missing or interface looks old: Reset the user profile by renaming ~/.config/libreoffice to ~/.config/libreoffice.bak and restarting LibreOffice.
  • Cannot install because of “held broken packages”: Run sudo apt update and sudo apt upgrade first, then try again.

Choosing Between Repository, PPA, and Manual Install

Your choice depends on your needs:

  • Repository version: Best for most users—stable, secure, and easy to update.
  • PPA version: Good if you want the newest features and are okay with slightly less testing.
  • Manual .deb: Only for specific version requirements (like LibreOffice 5) and you accept the security risks and lack of updates.

If you are installing LibreOffice 5 for a production environment, consider the fact that it is unsupported. The Document Foundation recommends upgrading to a supported version to receive security fixes.

Cost and Licensing

LibreOffice is free and open-source software, released under the Mozilla Public License v2.0. You can install it on as many machines as you like without paying licensing fees. There is no cost for the software itself, but you may incur bandwidth costs when downloading large packages. The suite includes a full-featured word processor, spreadsheet, presentation tool, and more, making it a viable alternative to proprietary office suites.

Frequently Asked Questions

Can I install LibreOffice 5 on Ubuntu 20.04?

Technically yes, but it is not recommended. The .deb packages from 5.4.7 may work if you manually resolve dependencies, but they were built for older libraries and may break. The PPA will not give you 5.x on 20.04; it will give you the latest version. For a stable system, use the repository version.

How do I uninstall LibreOffice completely?

Run sudo apt remove --purge libreoffice* to remove all LibreOffice packages and configuration files. If you installed from the .deb, use sudo dpkg -r for each package, but the apt command is easier if you installed via apt.

Will LibreOffice 5 open .docx files?

Yes, LibreOffice 5 can open and save Microsoft Office formats like .docx, .xlsx, and .pptx. However, complex formatting may not render perfectly, especially with files created in newer versions of Microsoft Office.

Is LibreOffice 5 safe to use?

No, because it is end-of-life and has known security vulnerabilities that are not patched. Using it on a machine with internet access exposes you to potential exploits. If you need the 5.x interface, consider upgrading to a supported version and adjusting the UI settings to resemble the older look.

Can I have both LibreOffice 5 and a newer version installed?

Yes, but it is messy. You can install the .deb version of 5.x and then install a newer version via snap or flatpak. However, file associations and menu entries may conflict. It is simpler to use a virtual machine or container for testing older versions.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →