Okular is a document viewer developed by the KDE community that handles PDF, EPUB, DjVu, CHM, XPS, and many other formats. It includes text highlighting, annotations, bookmarks, and the ability to extract text and images, features that make it practical for reviewing academic papers, annotating contracts, or working across multiple document types.
This guide walks through how to install Okular on Ubuntu using three methods so you can choose the approach that fits your workflow. All steps apply to Ubuntu 26.04, 24.04, and 22.04 LTS.
Choose Your Okular Installation Method for Ubuntu
Ubuntu provides multiple ways to install Okular. The following table compares each method to help you choose the best option for your needs.
| Method | Channel | Version | Updates | Best For |
|---|---|---|---|---|
| APT | Ubuntu Repos | Distribution default | Via apt upgrade | Most users who prefer stable, tested packages |
| Snap | Snapcraft | Latest stable | Automatic | Users wanting automatic background updates |
| Flatpak | Flathub | Latest stable | Via flatpak update | Users preferring sandboxed applications |
For most users, the APT method is recommended because it integrates seamlessly with the Ubuntu desktop and receives security updates through standard system maintenance. Alternatively, choose Snap if you prefer automatic updates without manual intervention, or Flatpak if you want application sandboxing.
Install Okular on Ubuntu
Pick one of the three methods below based on the comparison table above, then follow the steps through to verification.
Method 1: Install Okular on Ubuntu via APT
Update Ubuntu Packages
First, ensure your system packages are current. This step refreshes the package index and applies any pending security updates:
sudo apt update && sudo apt upgrade
If your user account does not have sudo privileges, see how to add and manage sudo users on Ubuntu before continuing.
Install Okular
With your system updated, next install Okular from the Ubuntu repository. The APT version is well-tested and integrates with the Ubuntu desktop environment:
sudo apt install okular
After the installation completes, verify that Okular is available by checking its package status:
apt-cache policy okular
The output confirms the installed version and repository source:
okular:
Installed: 4:23.08.5-0ubuntu5
Candidate: 4:23.08.5-0ubuntu5
Version table:
*** 4:23.08.5-0ubuntu5 500
500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
Ubuntu 26.04 LTS includes Okular 25.12.x, Ubuntu 24.04 LTS ships 23.08.x (shown above), and Ubuntu 22.04 LTS provides 21.12.x. The installation commands work identically across all three releases.
Method 2: Install Okular on Ubuntu via Snap
Snap provides containerized applications that update automatically in the background. Since Ubuntu includes Snap by default, you can install Okular immediately without additional setup.
To begin, install Okular via Snap by running the following command:
sudo snap install okular
Once the installation completes, verify it by listing installed Snap packages:
snap list okular
The output shows the installed Snap version and channel:
Name Version Rev Tracking Publisher Notes okular 24.08.3 196 latest/stable kde✓ -
Method 3: Install Okular on Ubuntu via Flatpak and Flathub
Flatpak provides sandboxed applications that run isolated from the main system. This method is useful if you want the latest version with enhanced security through containerization.
Flatpak is not pre-installed on Ubuntu. If you have not set it up yet, install it with
sudo apt install flatpakand restart your session before continuing. For detailed setup including the Flathub repository, follow our Flatpak installation guide for Ubuntu.
Enable Flathub Repository
Before installing Okular, first add the Flathub repository to your Flatpak configuration. The --if-not-exists flag ensures no error occurs if Flathub is already configured:
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Install Okular via Flatpak
With Flathub configured, install Okular using the following command. The -y flag automatically confirms the installation prompts:
sudo flatpak install flathub org.kde.okular -y
After installation, verify that Okular is available by checking its Flatpak information:
sudo flatpak info org.kde.okular
The output confirms the installation details:
ID: org.kde.okular
Ref: app/org.kde.okular/x86_64/stable
Arch: x86_64
Branch: stable
Origin: flathub
Launch Okular on Ubuntu
Once installation is complete, you can launch Okular from the terminal or through the graphical desktop environment.
Launch from Terminal
The terminal command varies depending on your installation method:
APT installation:
okular
Snap installation:
snap run okular
Flatpak installation:
flatpak run org.kde.okular
Launch from Applications Menu
Alternatively, to launch Okular from the desktop environment:
- Click on ‘Activities’ in the top-left corner of your screen.
- Type ‘Okular’ in the search field.
- Click the Okular icon to launch the application.


Update Okular on Ubuntu
Keeping Okular updated ensures you have the latest features and security fixes. The update process depends on your installation method.
Update via APT
For APT installations, Okular updates alongside other system packages:
sudo apt update && sudo apt upgrade
Update via Snap
Snap packages update automatically in the background. However, you can manually trigger an update with:
sudo snap refresh okular
Update via Flatpak
For Flatpak installations, update all installed applications with:
sudo flatpak update
Troubleshoot Okular on Ubuntu
Okular Fails to Launch with Display Error
If Okular fails to launch, you may see an error similar to the following:
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized.
This occurs when Qt display libraries are missing or when you are running in a non-graphical session (for example, over SSH without X11 forwarding). First, confirm you are in a graphical session:
echo $XDG_SESSION_TYPE
The output should show x11 or wayland. If the variable is empty, you are not in a graphical session. Log into your desktop directly or enable X11 forwarding with ssh -X.
For Flatpak installations specifically, ensure you have restarted your session after installing Flatpak. Some desktop integration features require a fresh login to work correctly.
After resolving the issue, verify Okular launches:
okular --version
Okular Theme Does Not Match GNOME Desktop
Okular is a Qt/KDE application, so it may appear visually inconsistent on the default GNOME desktop. This happens because GNOME does not automatically style Qt applications to match its own Adwaita theme.
To match Okular with your GNOME theme, install the Adwaita Qt theme and the Qt5 configuration tool:
sudo apt install adwaita-qt qt5ct
Next, set the QT_QPA_PLATFORMTHEME environment variable so Qt applications use qt5ct for theming:
echo 'export QT_QPA_PLATFORMTHEME=qt5ct' >> ~/.profile
Apply the change immediately without logging out:
source ~/.profile
Alternatively, log out and back in for the change to take effect. Then open qt5ct from your applications menu and select the Adwaita style. Relaunch Okular to confirm the theme applies correctly.
Remove Okular from Ubuntu
If you no longer need Okular, use the removal commands below that match your installation method.
Remove via APT
Remove Okular and clean up orphaned dependencies that were installed alongside it:
sudo apt remove okular
sudo apt autoremove
Verify the removal completed successfully:
apt-cache policy okular
The output should show Installed: (none), confirming Okular is no longer on the system.
Remove via Snap
For Snap installations, remove Okular with:
sudo snap remove okular
Remove via Flatpak
To remove a Flatpak-installed Okular along with its application data:
sudo flatpak uninstall --delete-data org.kde.okular
To complete the cleanup, remove unused Flatpak runtimes that were installed as dependencies:
sudo flatpak uninstall --unused
Okular supports annotations, highlighting, and text notes on PDF files, but it is not a full PDF editor. You can add comments and markup, then save the annotated version. For tasks like rearranging pages or editing text within a PDF, you need a dedicated editor such as LibreOffice Draw or a command-line tool like pdftk.
Okular supports PDF, EPUB, DjVu, CHM, XPS, PostScript, TIFF, DVI, Fiction Book, Comic Book (CBR/CBZ), Plucker, Fax, and common image formats. Installing the okular-extra-backends package adds additional format support.
Okular runs on any Linux desktop environment including GNOME, XFCE, and KDE Plasma. On GNOME, it pulls in some KDE/Qt libraries during installation but functions normally. Installing the adwaita-qt and qt5ct packages helps Okular blend visually with the GNOME Adwaita theme.
Conclusion
You now have Okular installed on Ubuntu, giving you a capable document viewer for PDFs, EPUBs, and numerous other formats. The APT method provides stability with system-managed updates, Snap delivers automatic background updates, and Flatpak offers sandboxed isolation. For other KDE applications on Ubuntu, see our guides on installing KDevelop on Ubuntu and KDE Plasma on Ubuntu for full desktop integration.
Okular is fantastic. Didn’t work stable from snap on Ubuntu 24.04LTS, via apt it’s working good
Love it, simple and easy to adapt documents edited before