How to Install The Latest Kodi 21.2 in Debian 12 Bookworm

This is a step by step guide shows how to install the latest version of Kodi home theater software (so far 21.2) in Debian 12 Bookworm.

Kodi, formerly XBMC, is a popular free open-source media player and organizer for PC, mobile, TV, and Xbox.

Kodi is available in Debian repository, but old! For the most recent version (21.2 so far), you may install it with either way below:

  • official Flatpak package, runs in sandbox environment.
  • native .deb package, maintained by deb-multimedia repository.

Option 1: Install Kodi via Flatpak package

Kodi provides official Linux package through Flatpak package. It works in most Linux and even Chrome OS on amd64 and arm64 CPU platforms, however runs in sandbox environment.

First, press Ctrl+Alt+T to open up a terminal window. Then run command to install the Flatpak daemon:

sudo apt install flatpak

Other Linux can follow this setup guide to enable Flatpak support.

Next, run command to install the app as Flatpak package:

flatpak install https://dl.flathub.org/repo/appstream/tv.kodi.Kodi.flatpakref

The app needs a separated freedesktop platforms (also installed in sandbox), so there will be lots of download as the screenshot below shows you.

After installed the package, just search for and launch it from start menu. If app icon is not visible, either log out and back in, or run the command below to start from terminal:

flatpak run tv.kodi.Kodi

And, to check updates for the Kodi Flatpak package, use command:

flatpak update tv.kodi.Kodi

Option 2: Install Kodi native .deb package

Deb Multimedia is a very popular Debian repository that hosts tons of .deb packages for multimedia applications and libraries, including Kodi.

1. Add Deb Multimedia repository

First, open up a terminal window either from start menu or by pressing Ctrl+Alt+T on keyboard.

When it opens, run command to create a source file with nano command line text editor:

sudo nano /etc/apt/sources.list.d/deb-multimedia.sources

There copy and paste the following lines into the file:

Types: deb
URIs: https://www.deb-multimedia.org
Suites: bookworm bookworm-backports
Components: main
Signed-By: /etc/apt/keyrings/deb-multimedia-keyring.gpg

Finally, press Ctrl+S to save and Ctrl+X to eixt.

2. Download & install the key

To make your system trust the package from that repository, you also need to download & install the GPG key.

First, click the button below to go to the web page, and click download the most recent .deb package:


Then, run command in terminal to install it:

sudo apt install ~/Downloads/deb-multimedia-keyring*.deb

It will automatically install the key file to /etc/apt/keyrings directory mentioned in the last step.

3. Set Priority (Optional)

The Deb Multimedia repository includes tons of other apps and libraries. You may set a lower priority for that repository, so it won’t install updates from it unless you intent to.

First, run command to create a config file for apt package manager:

sudo nano /etc/apt/preferences.d/99deb-multimedia

Then, add the lines below:

Package: *
Pin: origin www.deb-multimedia.org
Pin-Priority: 1

Finally, press Ctrl+X, type y and hit Enter to save file.

4. Refresh cache & install Kodi

Finally, run command to refresh system package cache:

sudo apt update

In the output, it should include a line looks like ‘Hit/Get x: https://www.deb-multimedia.org bookworm …’

And, install kodi from deb multimedia repository:

sudo apt install kodi -t "o=Unofficial Multimedia Packages"

Here -t flag plus the keyword under double quotation marks tells where to install the package from. For choice, you may re-run the last command but replace kodi in command with kodi plugins/add-ons (type kodi- and hit Tab to print).

After installed Kodi, you may either launch it from start menu, or log out and choose login with Kodi session.

Uninstall Kodi in Debian

To uninstall the Flatpak package, use command:

flatpak uninstall --delete-data tv.kodi.Kodi

Also run flatpak uninstall --unused to remove useless run-times.

To uninstall the .deb packge, run command:

sudo apt remove --autoremove kodi kodi-data kodi-bin

Also, remove the deb-multimedia repository by removing the source and key files:

  • To remove the source file, run command:
    sudo rm /etc/apt/sources.list.d/deb-multimedia.sources
  • To remove the GPG key:
    sudo rm /etc/apt/keyrings/deb-multimedia-keyring.gpg
  • You may also remove the config file for the package priority:
    sudo rm /etc/apt/preferences.d/99deb-multimedia

Finally, run sudo apt update to refresh cache.

Hi, I'm Ji, the creator of Ubuntuhandbook.org. Now, I'm also writing partly in this web site.