WindowsmacOSLinux

Where Does Kodi Store Its Library Database?

Kodi keeps its library index in SQLite files inside the userdata Database folder. The Windows, macOS and Linux paths, plus what deleting them costs.

Last updated

Kodi's library lives in a handful of SQLite files rather than in a folder of media. Your films, shows and albums, along with watched flags, resume points and artwork references, go into a few .db files. The media itself stays wherever you pointed Kodi.

Those files sit in a Database folder inside userdata, next to a Thumbnails folder that caches every image Kodi has downloaded. The main ones are MyVideos*.db, MyMusic*.db and Textures*.db, each carrying a version number that changes as Kodi updates its schema.

Add special://profile/Database as a source in Settings > File manager and Kodi opens the folder, so you never have to guess the address. Delete that folder and the library goes with it, but the media does not: Kodi rebuilds the index by scanning your sources again.

Where Kodi stores this, by platform

Windows
C:\Users\[Username]\AppData\Roaming\Kodi\userdata\Database

%APPDATA%\Kodi is the data folder for the installer build, and Database sits inside userdata with Thumbnails beside it. The Microsoft Store build keeps the same tree under %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi, while a portable install puts it in portable_data next to kodi.exe. Type %appdata% in the Explorer address bar rather than hunting for the hidden folder.

macOS
~/Library/Application Support/Kodi/userdata/Database

Kodi's own documentation lists this path for macOS, with the Thumbnails folder as a sibling of Database. Finder hides Library, so use Go > Go to Folder and paste the path, or reach the folder through the File manager trick above. Older installs used an XBMC folder here, renamed when the project became Kodi.

Linux
~/.kodi/userdata/Database

Before Kodi 14 (Helix) the folder was ~/.xbmc, and Kodi renamed it to ~/.kodi and migrated the contents on first run, so guides quoting .xbmc are describing an old install. It is a hidden folder, so show hidden files in your file manager. Flatpak builds use ~/.var/app/tv.kodi.Kodi/data instead.

Frequently asked questions

where does kodi store its database files

In the Database folder inside userdata: %APPDATA%\Kodi\userdata\Database on Windows, ~/Library/Application Support/Kodi/userdata/Database on macOS and ~/.kodi/userdata/Database on Linux. Each file is SQLite with a version number in the name, such as MyVideos131.db.

how do i find the kodi database folder on my device

Open Settings, go to File manager and add special://profile/Database as a source; Kodi opens the folder whatever system you are on. On a desktop you can also browse to the userdata folder directly, and advancedsettings.xml, if you ever made one, is sitting in that same userdata folder.

if i delete the kodi database will i lose my movies

No. The database is an index, so deleting it only removes library entries, watched flags and resume points. Your media files are untouched. Kodi scans your sources again to rebuild it, though wiping all of userdata also clears your sources, so you have to re-add them first.

Notice an outdated path? Let us know.