LibreOffice is a powerful and versatile open-source office suite that includes a range of applications such as Writer (word processor), Calc (spreadsheet), Impress (presentation), and Draw (vector graphics editor). It serves as a popular alternative to Microsoft Office, offering extensive compatibility with various document formats, including Microsoft’s proprietary formats like DOCX, XLSX, and PPTX. LibreOffice is known for its rich feature set, regular updates, and active community support, making it a reliable choice for both personal and professional use.
On Debian 12 or 11, LibreOffice can be installed using two primary methods. The first method is via Debian’s default repository, which provides a stable version that is well-integrated with the system. Alternatively, for those who prefer to have the latest version with potentially newer features, LibreOffice can be installed via Flatpak from Flathub. This method also provides a sandboxed environment that ensures isolation from the rest of the system. This guide will walk you through both installation methods, helping you choose the one that best fits your needs.
Method 1: Install LibreOffice via APT Default Repository
Update Debian Linux Before LibreOffice Installation
Before installing any new software, it’s a best practice to update the existing packages on your Debian system. This ensures compatibility and smooth operation.
sudo apt update
sudo apt upgrade
Install LibreOffice via standard APT Commands
After updating the system, you can install the LibreOffice suite using the APT package manager.
sudo apt install libreoffice
Optional: Enable LibreOffice Backports on Debian
For those using older Debian distributions, such as Buster, there’s an option to enable backports. This allows users to access more recent versions of the LibreOffice suite.
Ensure the installation of all necessary packages:
sudo apt install lsb-release
Then, proceed to install the backported version of LibreOffice:
sudo apt install -t $(lsb_release -cs)-backports libreoffice
Note: If backports aren’t enabled on your system, refer to our comprehensive guide on enabling backports or experimental repositories for all Debian Linux distributions.
Method 2: Install LibreOffice via Flatpak and Flathub
For users seeking the latest versions of LibreOffice, the default repositories might not suffice. While one could attempt APT pinning for unstable packages, this approach has risks. Given LibreOffice’s extensive package dependencies, using a third-party package manager like Flatpak becomes a more reliable choice.
Enable Flathub for LibreOffice
To access the vast collection of applications on Flathub, you first need to add the Flathub repository.
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Note: If Flatpak isn’t installed on your system, the above command won’t function. For a step-by-step guide, visit how to install Flatpak on Debian Linux.
Install LibreOffice via Flatpak Command
With Flathub enabled, you can now install LibreOffice using Flatpak.
flatpak install flathub org.libreoffice.LibreOffice -y
Launching LibreOffice Suite
After successfully installing LibreOffice on your Debian system, you can open and use the suite in multiple ways. You can choose to use the terminal or prefer a graphical approach.
Launch LibreOffice from the Terminal
Access your terminal application as you typically would on your Debian system, then open LibreOffice with inputting the following command:
libreoffice
However, if you’ve installed LibreOffice using Flatpak, the command differs slightly:
flatpak run org.libreoffice.LibreOffice
Launch LibreOffice from the Application Icon
Navigate to your application menu or dashboard and search “LibreOffice.” Once you locate the LibreOffice icon, click on it. This action will launch the LibreOffice suite, and from there, you can select the specific application (like Writer, Calc, or Impress) you wish to use.
Additional Commands for LibreOffice
Update LibreOffice
APT Update Command for LibreOffice
Updating it if you’ve installed LibreOffice using the APT package manager is straightforward. Regularly updating ensures you have the latest features and security patches.
sudo apt update
sudo apt upgrade libreoffice
Flatpak Update Command for LibreOffice
The update process is slightly different but equally simple for those who’ve opted for the Flatpak installation.
flatpak update org.libreoffice.LibreOffice
Remove (Uninstalling) LibreOffice on Debian
There might come a time when you need to uninstall LibreOffice, either to free up space or to resolve specific issues. Depending on your installation method, the removal process varies.
APT Remove Command for LibreOffice
If you’ve installed LibreOffice through the APT package manager on Debian, you can uninstall it using the following command:
sudo apt remove libreoffice
Flatpak Remove Command for LibreOffice
For users who’ve installed the Flatpak version of LibreOffice, the uninstallation command is:
flatpak uninstall org.libreoffice.LibreOffice -y
Conclusion
By installing LibreOffice on your Debian system using either the default repository or Flatpak with Flathub, you gain access to a comprehensive office suite that can handle a wide range of document creation and editing tasks. The Debian repository offers a stable and straightforward installation, while Flatpak provides access to potentially newer features and updates in a sandboxed environment. Regular updates through these channels will ensure that your LibreOffice installation remains secure and equipped with the latest tools, enabling you to work efficiently on Debian.
Indeed, it is odd and counter-intuitive.
Gérard
Dear Sir,
At Step 3 of Method 1
I believe it is lsb_release (using an underscore character)
and not
lsb-release (using an hyphen character)
Either way, there must be an error at Step 3 of Method 1.
Joshua,
Oops!… I could be wrong here.. since the
lsb-release (with an hyphen) package exists!
https://packages.debian.org/bookworm/lsb-release
Gérard
Hiya Gérard.
It is
to install the required dependencies. and lsb_release in the secondary command, feels a bit odd, doesn’t it? hah.
Cheers.