How to Install Darktable on Ubuntu

Darktable transforms your computer into a digital darkroom for processing raw photos from your camera. Unlike basic photo editors, Darktable works non-destructively, storing all edits separately from your original files so you can refine adjustments indefinitely without quality loss. Photographers use it to develop raw images, organize photo libraries through its lighttable view, and apply sophisticated color grading that matches professional workflows.

This guide walks through installing Darktable on Ubuntu using four methods: the default Ubuntu repository (simple but older versions), Snap (automatic updates from Snapcraft), Flatpak (latest stable from Flathub), and compiling from source (newest features with full optimization). By the end, you will have a working Darktable installation configured for your needs, along with the knowledge to update, troubleshoot, and remove it cleanly.

Choose Your Darktable Installation Method

Ubuntu offers multiple ways to install Darktable, each with distinct trade-offs between version freshness, system integration, and maintenance complexity. The comparison table below outlines each option:

MethodChannelVersionUpdatesBest For
APT (Default Repository)Ubuntu ReposDistribution defaultAutomatic via apt upgradeUsers who prefer stability over features
SnapSnapcraftLatest stableAutomatic background updatesUsers who want fresh versions without manual work
FlatpakFlathubLatest stableManual via flatpak updateUsers wanting sandboxed installs with newest features
Source CompilationGitHubLatest release or developmentManual recompilationPower users needing custom builds or newest features

For most users, the APT method is recommended because it integrates seamlessly with system updates and requires no additional setup. However, Ubuntu repositories often lag behind upstream releases significantly. If you need the latest Darktable features, Flatpak or Snap provide current versions without compilation complexity.

This guide covers Ubuntu 22.04 LTS, 24.04 LTS, and 26.04 LTS. The APT repository version varies by release (22.04 ships 3.8.x, 24.04 ships 4.6.x, 26.04 ships 5.2.x), while Flatpak and Snap provide the latest stable version regardless of your Ubuntu release. Commands shown work identically across all supported LTS versions unless noted otherwise.

Method 1: Install Darktable from Ubuntu Repository

Update Ubuntu System Packages

Before installing new software, refresh your package index and upgrade existing packages. This step ensures dependency compatibility and prevents version conflicts during installation:

sudo apt update
sudo apt upgrade

If kernel packages were updated, reboot your system before proceeding to ensure the new kernel loads properly.

Install Darktable via APT

Install Darktable from the default Ubuntu repository using the following command:

sudo apt install darktable

As a result, APT resolves dependencies automatically and integrates Darktable into your system’s package management. Future security updates then arrive through your regular system updates.

Verify APT Installation

Confirm the installation succeeded by checking the installed version:

darktable --version

The expected output varies by Ubuntu release:

this is darktable 5.2.1
copyright (c) 2009-2025 johannes hanika and other contributors.

On Ubuntu 24.04 LTS, this command shows version 4.6.1, while Ubuntu 22.04 LTS shows version 3.8.1. These version differences reflect each release’s package freeze date.

Method 2: Install Darktable via Snap

Snap packages run in isolated containers and update automatically in the background. Ubuntu includes Snap by default on standard desktop installations, making this method straightforward for users who want the latest Darktable without manual update management.

Install Darktable with Snap

Run the following command to install Darktable from the Snap Store:

sudo snap install darktable

During installation, Snap downloads the application and all its dependencies as a single bundle, and installs proceed without confirmation prompts.

Ubuntu includes Snap by default on standard desktop and server installations. If you are using a minimal installation, WSL, or a container image where snap is missing, install it with sudo apt install snapd before proceeding.

Verify Snap Installation

Confirm that Darktable installed correctly by checking the version:

snap run darktable --version
this is darktable 5.4.0
copyright (c) 2009-2025 johannes hanika and other contributors.

Method 3: Install Darktable via Flatpak

Flatpak provides sandboxed applications that run independently of your system libraries. As a result, this isolation ensures Darktable behaves consistently across different Ubuntu versions and protects your system from potential conflicts. Therefore, Flatpak is particularly useful when you need the latest upstream release.

If Flatpak is not installed on your system, follow our Flatpak installation guide for Ubuntu to set up the Flatpak framework and add the Flathub repository. This typically takes under five minutes.

Enable Flathub Repository

First, ensure the Flathub repository is configured on your system. Flathub hosts the largest collection of Flatpak applications:

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

In this command, the --if-not-exists flag prevents errors if Flathub is already configured. Additionally, using sudo adds the remote system-wide so all users can access it.

Install Darktable via Flatpak

With Flathub enabled, install Darktable using the following command:

sudo flatpak install flathub org.darktable.Darktable -y

Here, the -y flag automatically confirms the installation prompts. Subsequently, Flatpak downloads the application along with any required runtimes.

Verify Flatpak Installation

To verify the installation, confirm Darktable installed correctly:

flatpak run org.darktable.Darktable --version
this is darktable 5.4.0
copyright (c) 2009-2025 johannes hanika and other contributors.

Method 4: Compile Darktable from Source

Compiling from source provides the latest features, enables processor-specific optimizations, and allows custom build configurations. This method suits power users who need cutting-edge functionality or want maximum performance on their specific hardware. The darktable project provides a convenient build script that handles most complexity automatically.

Install Build Dependencies

Darktable requires numerous development libraries for image processing, GPU acceleration, and camera support. The recommended approach uses Ubuntu’s build-dependency system, which automatically determines and installs everything required for your specific Ubuntu version:

sudo sed -e '/^#\sdeb-src /s/^# *//' "/etc/apt/sources.list" \
  | sudo tee /etc/apt/sources.list.d/darktable-sources-tmp.list > /dev/null
sudo apt update
sudo apt build-dep darktable -y
sudo rm /etc/apt/sources.list.d/darktable-sources-tmp.list

This sequence temporarily enables source package repositories, installs all build dependencies for the darktable version in your Ubuntu release, then cleans up the temporary sources file. If you prefer to install dependencies manually, use the following command:

sudo apt install build-essential cmake git libgtk-3-dev libexiv2-dev \
  libsqlite3-dev libpugixml-dev liblcms2-dev libjpeg-dev libtiff-dev \
  liblensfun-dev libpng-dev libcurl4-openssl-dev liblua5.4-dev \
  libgphoto2-dev libavif-dev libheif-dev libwebp-dev libopenjp2-7-dev \
  libopenexr-dev libgmic-dev libportmidi-dev libsdl2-dev libcups2-dev \
  intltool xsltproc -y

Ubuntu 24.04 and 26.04 include libjxl-dev for JPEG XL support, while Ubuntu 22.04 does not. If you are on 24.04 or 26.04, add libjxl-dev to the manual command above for JPEG XL import/export capability. The apt build-dep method handles this automatically.

Clone the Source Repository

Next, download the darktable source code with all required submodules:

git clone --recurse-submodules --depth 1 https://github.com/darktable-org/darktable.git ~/darktable-src
cd ~/darktable-src

In this command, the --depth 1 flag creates a shallow clone that downloads only the latest commit, saving bandwidth and disk space. Meanwhile, the --recurse-submodules flag ensures RawSpeed, LibRaw, and other embedded libraries are included.

To compile a specific stable release instead of the development branch, fetch tags and check out the release you want after cloning. For example: git fetch --tags && git checkout tags/release-5.4.0. Check the GitHub releases page for available versions.

Compile and Install Darktable

The darktable project provides a build script that configures optimal settings for your system automatically:

./build.sh --prefix /opt/darktable --build-type Release --install --sudo

This command builds Darktable with Release optimizations (including -O3, SSE/AVX detection, OpenMP multi-threading, and OpenCL GPU support if available) and installs it to /opt/darktable. Compilation time varies from 10 minutes on fast systems to over an hour on older hardware.

After installation, create a symbolic link so Darktable appears in your application menu:

sudo ln -s /opt/darktable/share/applications/org.darktable.darktable.desktop /usr/share/applications/

Verify Source Installation

Run the compiled binary to confirm everything works:

/opt/darktable/bin/darktable --version
this is darktable 5.4.0+2103~g51a9f8ec4f
copyright (c) 2009-2025 johannes hanika and other contributors.

Notice that the version string includes the git commit hash when built from source, helping identify your exact build.

Create an Update Script

Source installations require manual updates when new versions release. Create a script to simplify this process:

cat <<'EOF' | sudo tee /usr/local/bin/update-darktable
#!/bin/bash
set -e

SOURCE_DIR="$HOME/darktable-src"

if [[ ! -d "$SOURCE_DIR" ]]; then
    echo "Error: Source directory $SOURCE_DIR not found."
    echo "Clone the repository first with:"
    echo "  git clone --recurse-submodules https://github.com/darktable-org/darktable.git $SOURCE_DIR"
    exit 1
fi

CURRENT_VERSION=$(/opt/darktable/bin/darktable --version 2>/dev/null | grep -oP 'darktable \K[0-9.]+' || echo "not installed")

cd "$SOURCE_DIR"
git fetch --tags
git pull --recurse-submodules

LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "unknown")

echo "Current installed version: $CURRENT_VERSION"
echo "Latest available version: $LATEST_TAG"

read -p "Proceed with rebuild? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
    rm -rf build
    ./build.sh --prefix /opt/darktable --build-type Release --install --sudo
    echo "Update complete. New version:"
    /opt/darktable/bin/darktable --version
fi
EOF
sudo chmod +x /usr/local/bin/update-darktable

Afterward, run the update script from any directory when you want to check for and install new versions:

update-darktable

Launch Darktable

After installation, you can start Darktable from either the terminal or your desktop application menu.

Launch from Terminal

The terminal command varies by installation method:

APT installation:

darktable

Snap installation: (Snap also adds darktable to your PATH, so you can use either command)

darktable

Flatpak installation:

flatpak run org.darktable.Darktable

Source installation:

/opt/darktable/bin/darktable

Launch from Application Menu

For everyday use, launch Darktable from your desktop environment’s application menu:

  1. Click the Show Applications button or press the Super key.
  2. Type Darktable in the search field.
  3. Click the Darktable icon to launch the application.

Manage Darktable

After installation, you may need to update Darktable when new versions release or remove it if you no longer need it. The commands differ based on your original installation method.

Update Darktable

Regularly keeping Darktable current ensures you have the latest camera support, bug fixes, and features.

Update APT Installation

For APT installations, Darktable updates arrive through your regular system updates:

sudo apt update
sudo apt upgrade

These commands refresh the package index and install any available upgrades, including Darktable if a new version exists in Ubuntu’s repository.

Update Snap Installation

Snaps update automatically in the background. To trigger an immediate update check:

sudo snap refresh darktable

Update Flatpak Installation

To update the Flatpak version, refresh Darktable and all other Flatpak applications with:

sudo flatpak update

Update Source Installation

For source builds, if you installed the update script from the compilation section, run it to check for and install new versions:

update-darktable

Remove Darktable

To completely remove Darktable, follow the removal procedure matching your installation method to cleanly uninstall the application.

Remove APT Installation

To remove the APT installation, uninstall Darktable and clean up orphaned dependencies:

sudo apt remove darktable
sudo apt autoremove

Consequently, the autoremove command removes libraries that were installed solely for Darktable and are no longer needed.

Remove Snap Installation

sudo snap remove darktable

Remove Flatpak Installation

For Flatpak, remove Darktable and its associated application data:

sudo flatpak uninstall --delete-data org.darktable.Darktable

Here, the --delete-data flag removes Darktable’s Flatpak-specific configuration files. However, your photo library and edits stored elsewhere remain untouched.

Remove Source Installation

Warning: The following commands permanently delete the compiled installation. Your photo library and XMP sidecar files remain safe, but any custom presets stored in the installation directory will be lost.

sudo rm -rf /opt/darktable
sudo rm /usr/share/applications/org.darktable.darktable.desktop
sudo rm /usr/local/bin/update-darktable
rm -rf ~/darktable-src

Troubleshoot Darktable

Occasionally, Darktable encounters issues related to graphics drivers, color profiles, or system libraries. The following section covers common problems and their solutions.

Darktable Crashes on Startup

If Darktable crashes immediately when launching, the OpenCL driver may be incompatible. Start Darktable with OpenCL disabled to diagnose:

darktable --disable-opencl

If this resolves the crash, then your GPU’s OpenCL implementation has a compatibility issue. Consequently, you can either update your graphics drivers, disable OpenCL permanently in Darktable’s preferences (Settings > Processing > CPU/GPU > disable OpenCL), or switch to CPU-only processing.

Colors Look Wrong

Incorrect colors usually indicate a display color profile issue. On Wayland sessions, ensure you have colord installed for proper ICC profile detection:

sudo apt install colord

Then, verify that your display profile is being detected by checking Darktable’s preferences under Color Management. Additionally, if using multiple monitors, each display needs its own calibration profile configured.

Reset Darktable Configuration

If Darktable behaves erratically after an upgrade or configuration change, reset to defaults by backing up and removing the configuration directory:

mv ~/.config/darktable ~/.config/darktable.backup
darktable

As a result, Darktable creates a fresh configuration on next launch. After verifying the issue is resolved, you can then selectively restore presets or settings from the backup.

Flatpak Permission Issues

Sometimes, Flatpak’s sandboxing may prevent access to directories outside your home folder. To fix this, grant additional filesystem access using Flatseal or the command line:

flatpak override --user org.darktable.Darktable --filesystem=/mnt/photos

Simply replace /mnt/photos with the path to your photo library.

Final Thoughts

You now have Darktable installed and ready for raw photo processing. Whether you chose the simplicity of APT packages, the automatic updates of Snap, the isolation of Flatpak, or the performance benefits of a custom compile, the result is a professional-grade digital darkroom on your Ubuntu system. To continue learning, explore the lighttable for organizing your library, dive into the darkroom for non-destructive editing, and consult the official darktable documentation for detailed module guides as you refine your workflow.

Leave a Comment