One library not updating even after removal and recreation #7779

Open
opened 2026-02-07 05:23:53 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @MrSimmo on GitHub (Nov 17, 2025).

Description of the bug

Since upgrading to v10.11 (this issue is present on 10.11.2 and now 10.11.3) - I have a library (type: Home Photos and Videos) that does not update. It worked fine on 10.10.x - no config or filesystem changes.

Realtime monitoring - switched on and off (no difference).

Even when I force a full scan or replace all metadata, the library still contains media that no longer exists on disk and does not show new media that is now in the folder.

I've also deleted the library, ran all the maintenance scheduled tasks from the web ui, restarted the server. When I recreate the library (even with a different name) - the changes are not shown.

I saw that various people are reporting this but I thought a fix was in place for 10.11.3, but as its still happening to me, I'm reporting this as a new bug as it may not be the same.

Reproduction steps

As above.

What is the current bug behavior?

As above.

What is the expected correct behavior?

Library updates when filesystem changes happen (either automatically or via manual scan).

Jellyfin Server version

10.11.0+

Specify commit id

No response

Specify unstable release number

No response

Specify version number

No response

Specify the build version

10.11.3

Environment

- OS: Linux Ubuntu 24
- Linux Kernel: GNU/Linux 6.8.0-85-generic x86_6
- Virtualization: Docker
- Clients: All - happens on all
- Browser: Chrome, Safari, Firefox (happens on all)
- FFmpeg Version: Dont know - bundled in the docker image
- Playback Method: N/A
- Hardware Acceleration: Quicksync via docker
- GPU Model: Intel
- Plugins: Stock
- Reverse Proxy: Happens with and without proxy
- Base URL: /
- Networking: Wired lan
- Jellyfin Data Storage: Local bind mounts
- Media Storage: Local bind mounts
- External Integrations: None

Jellyfin logs

Will pull these when home later

FFmpeg logs


Client / Browser logs

No response

Relevant screenshots or videos

No response

Additional information

No response

Originally created by @MrSimmo on GitHub (Nov 17, 2025). ### Description of the bug Since upgrading to v10.11 (this issue is present on 10.11.2 and now 10.11.3) - I have a library (type: Home Photos and Videos) that does not update. It worked fine on 10.10.x - no config or filesystem changes. Realtime monitoring - switched on and off (no difference). Even when I force a full scan or replace all metadata, the library still contains media that no longer exists on disk and does not show new media that is now in the folder. I've also deleted the library, ran all the maintenance scheduled tasks from the web ui, restarted the server. When I recreate the library (even with a different name) - the changes are not shown. I saw that various people are reporting this but I thought a fix was in place for 10.11.3, but as its still happening to me, I'm reporting this as a new bug as it may not be the same. ### Reproduction steps As above. ### What is the current _bug_ behavior? As above. ### What is the expected _correct_ behavior? Library updates when filesystem changes happen (either automatically or via manual scan). ### Jellyfin Server version 10.11.0+ ### Specify commit id _No response_ ### Specify unstable release number _No response_ ### Specify version number _No response_ ### Specify the build version 10.11.3 ### Environment ```markdown - OS: Linux Ubuntu 24 - Linux Kernel: GNU/Linux 6.8.0-85-generic x86_6 - Virtualization: Docker - Clients: All - happens on all - Browser: Chrome, Safari, Firefox (happens on all) - FFmpeg Version: Dont know - bundled in the docker image - Playback Method: N/A - Hardware Acceleration: Quicksync via docker - GPU Model: Intel - Plugins: Stock - Reverse Proxy: Happens with and without proxy - Base URL: / - Networking: Wired lan - Jellyfin Data Storage: Local bind mounts - Media Storage: Local bind mounts - External Integrations: None ``` ### Jellyfin logs ```shell Will pull these when home later ``` ### FFmpeg logs ```shell ``` ### Client / Browser logs _No response_ ### Relevant screenshots or videos _No response_ ### Additional information _No response_
OVERLORD added the bug label 2026-02-07 05:23:53 +03:00
Author
Owner

@mathieu-lemay commented on GitHub (Nov 17, 2025):

I'm seeing something similar. I've had issues with my music library, so I've recreated it and while the dashboard says 877 album and 10726 songs, the Artists section of the library only shows a handful of them. If I trigger a full metadata re-scan, only a few more appear.

All I have in the logs since the last restart of jellyfin, and one full rescan is this:
jellyfin.log

Note that this is on version 10.11.1, I'm upgrading to 10.11.3 right now.

Edit: Same with 10.11.3, my music library just won't show all artists.

Edit 2: I deleted the library again. Then did a full restart of jellyfin (shutdown from the web UI and restarted the container), then I re-created the library and now it seems fine.

@mathieu-lemay commented on GitHub (Nov 17, 2025): I'm seeing something similar. I've had issues with my music library, so I've recreated it and while the dashboard says 877 album and 10726 songs, the Artists section of the library only shows a handful of them. If I trigger a full metadata re-scan, only a few more appear. All I have in the logs since the last restart of jellyfin, and one full rescan is this: [jellyfin.log](https://github.com/user-attachments/files/23587644/jellyfin.log) Note that this is on version 10.11.1, I'm upgrading to 10.11.3 right now. Edit: Same with 10.11.3, my music library just won't show all artists. Edit 2: I deleted the library again. Then did a full restart of jellyfin (shutdown from the web UI and restarted the container), then I re-created the library and now it seems fine.
Author
Owner

@adm-albayrme commented on GitHub (Nov 18, 2025):

I'm on Ubuntu 24 HP DL380 Gen Server with Nas attached. Almost same behaviour except that my movie library can't be accessed. As soon as I do it a ffmpeg process starts and eats up all 180 gigs of ram and that cpu hangs at 100%. Kill the process, remove library, readd it and boom same.
2 other libraries with Series and Anime are just fine. This issues started all since the last update to 10.11.3 ffmpeg7.
While it eats the RAM , nothing is written into the logs. For now no movies library and see what the next update brings.

@adm-albayrme commented on GitHub (Nov 18, 2025): I'm on Ubuntu 24 HP DL380 Gen Server with Nas attached. Almost same behaviour except that my movie library can't be accessed. As soon as I do it a ffmpeg process starts and eats up all 180 gigs of ram and that cpu hangs at 100%. Kill the process, remove library, readd it and boom same. 2 other libraries with Series and Anime are just fine. This issues started all since the last update to 10.11.3 ffmpeg7. While it eats the RAM , nothing is written into the logs. For now no movies library and see what the next update brings.
Author
Owner

@fatexs commented on GitHub (Nov 18, 2025):

I have a the same issue on 10.11.2 just one of my librarys did not recognize a new folder added to the library.

I run through some troubleshooting in the matrix chat. And it was not anything obvious (access right,file system available, etc. ) so as this seems to be very similar to this bug report I follow this one for now :)

@fatexs commented on GitHub (Nov 18, 2025): I have a the same issue on 10.11.2 just one of my librarys did not recognize a new folder added to the library. I run through some troubleshooting in the matrix chat. And it was not anything obvious (access right,file system available, etc. ) so as this seems to be very similar to this bug report I follow this one for now :)
Author
Owner

@MrSimmo commented on GitHub (Nov 29, 2025):

Made a bit of progress with this.

Deleting the library in the web interface, left the library in the sql database (version 10.11.3). There was also a second copy of the library which looked to be orphaned in the DB as well. This meant that whenever you recreate the library (even with a different) name, it didn't actually recreate it in the database.

I manually went into the DB, removed the entries, restarted Jellyfin, added the library again and it looks so far like its working.

This is what I did (please do not just copy/paste this as it could destructively wreck your Jellyfin DB): (Mine is running in a Docker container with bind mounts, there is no password to modify the database, which isn't particularly good but I guess filesystem permissions are expected to manage access):

  1. Installed the sqlite3 client for linux
apt update && apt install sqlite3
  1. Stop jellyfin server (I just used Portainer but you can stop yours however you normally do)

  2. Connect to the sql database

sqlite3 /folder/jellyfin.db
  1. Search for any items (libraries etc) that contain the broken library string (in this example we'll use Downloads). Watch out though - searching for things like 'Temp' will return lots of erroneous results. This also checks for children items within there.
-- Find all items with "Downloads" in the name
-- This shows libraries, folders, and any media files with Downloads in the name
-- Columns shown: unique ID, item name, what type of item it is, file path, and parent item ID
SELECT 
    Id,           -- Unique identifier for this item
    Name,         -- Display name of the item
    Type,         -- What kind of item (CollectionFolder=library, Folder=directory, etc.)
    Path,         -- Physical file system path
    ParentId      -- ID of the parent item (what contains this item)
FROM BaseItems 
WHERE Name LIKE '%Downloads%'  -- Match any name containing "Downloads"
ORDER BY Type, Name;            -- Sort by type first, then alphabetically by name

-- Count how many child items each Downloads item has
-- This helps you understand how much data will be deleted
-- Shows parent name, parent ID, and count of items inside it
SELECT 
    b1.Name as ParentName,       -- Name of the Downloads item
    b1.Id as ParentId,           -- ID of the Downloads item
    COUNT(b2.Id) as ChildCount   -- How many items are inside it
FROM BaseItems b1                -- b1 = potential parent items
LEFT JOIN BaseItems b2 ON b2.ParentId = b1.Id  -- b2 = child items
WHERE b1.Name LIKE '%Downloads%'  -- Only look at items with Downloads in name
GROUP BY b1.Id, b1.Name;         -- Group results by each Downloads item
  1. Delete the rogue items. Replace the IDs with the ones found above
-- Start a transaction - this groups all changes together
-- If anything goes wrong, you can ROLLBACK instead of COMMIT
BEGIN TRANSACTION;

-- FIRST: Delete all child items inside the Downloads folder
-- Replace 'DDA3FC7D-2094-7132-2527-EEA2ADB8DAF9' with the actual folder ID from your search results
-- This removes any movies, episodes, music files, etc. that are inside the Downloads folder
DELETE FROM BaseItems 
WHERE ParentId = 'DDA3FC7D-2094-7132-2527-EEA2ADB8DAF9';  -- ID of the Downloads Folder

-- SECOND: Delete the Downloads folder itself
-- Now that its children are gone, we can safely delete the folder
-- Replace with the actual Downloads Folder ID from your search results
DELETE FROM BaseItems 
WHERE Id = 'DDA3FC7D-2094-7132-2527-EEA2ADB8DAF9';  -- Downloads Folder under /media/WD4GB-1/Downloads

-- THIRD: Delete the Downloads CollectionFolder (library)
-- Replace with the actual Downloads library ID from your search results
-- This removes the library entry from Jellyfin's library list
DELETE FROM BaseItems 
WHERE Id = '08DA936D-C99A-3E5F-30BD-B6AA1FE6D1A7';  -- Downloads library under /config/root/default/Downloads

-- Save all changes to the database
-- Only run this if you're sure you want to delete everything!
-- If you want to undo, type ROLLBACK; instead of COMMIT;
COMMIT;
  1. Verify they're gone
-- Double-check that the specific Downloads items are gone
-- This query should return zero results if deletion was successful
SELECT 
    Id,           -- Item ID
    Name,         -- Item name
    Type,         -- Item type
    Path          -- File path
FROM BaseItems 
WHERE Id IN (
    '08DA936D-C99A-3E5F-30BD-B6AA1FE6D1A7',  -- Downloads library
    'DDA3FC7D-2094-7132-2527-EEA2ADB8DAF9'   -- Downloads folder
);  -- Should return nothing if deletion worked
  1. Exit from sqlite3
.quit
  1. Start Jellyfin and add in the library

I actually ran a lot more commands than that, where I searched for the first entry and then thought there could be more copies lying around. I can share those as well if its useful.

@MrSimmo commented on GitHub (Nov 29, 2025): Made a bit of progress with this. Deleting the library in the web interface, left the library in the sql database (version 10.11.3). There was also a second copy of the library which looked to be orphaned in the DB as well. This meant that whenever you recreate the library (even with a different) name, it didn't actually recreate it in the database. I manually went into the DB, removed the entries, restarted Jellyfin, added the library again and it looks so far like its working. This is what I did (please do not just copy/paste this as it could destructively wreck your Jellyfin DB): (Mine is running in a Docker container with bind mounts, there is no password to modify the database, which isn't particularly good but I guess filesystem permissions are expected to manage access): 1. Installed the sqlite3 client for linux ``` apt update && apt install sqlite3 ``` 2. Stop jellyfin server (I just used Portainer but you can stop yours however you normally do) 3. Connect to the sql database ``` sqlite3 /folder/jellyfin.db ``` 4. Search for any items (libraries etc) that contain the broken library string (in this example we'll use Downloads). Watch out though - searching for things like 'Temp' will return lots of erroneous results. This also checks for children items within there. ``` -- Find all items with "Downloads" in the name -- This shows libraries, folders, and any media files with Downloads in the name -- Columns shown: unique ID, item name, what type of item it is, file path, and parent item ID SELECT Id, -- Unique identifier for this item Name, -- Display name of the item Type, -- What kind of item (CollectionFolder=library, Folder=directory, etc.) Path, -- Physical file system path ParentId -- ID of the parent item (what contains this item) FROM BaseItems WHERE Name LIKE '%Downloads%' -- Match any name containing "Downloads" ORDER BY Type, Name; -- Sort by type first, then alphabetically by name -- Count how many child items each Downloads item has -- This helps you understand how much data will be deleted -- Shows parent name, parent ID, and count of items inside it SELECT b1.Name as ParentName, -- Name of the Downloads item b1.Id as ParentId, -- ID of the Downloads item COUNT(b2.Id) as ChildCount -- How many items are inside it FROM BaseItems b1 -- b1 = potential parent items LEFT JOIN BaseItems b2 ON b2.ParentId = b1.Id -- b2 = child items WHERE b1.Name LIKE '%Downloads%' -- Only look at items with Downloads in name GROUP BY b1.Id, b1.Name; -- Group results by each Downloads item ``` 5. Delete the rogue items. Replace the IDs with the ones found above ``` -- Start a transaction - this groups all changes together -- If anything goes wrong, you can ROLLBACK instead of COMMIT BEGIN TRANSACTION; -- FIRST: Delete all child items inside the Downloads folder -- Replace 'DDA3FC7D-2094-7132-2527-EEA2ADB8DAF9' with the actual folder ID from your search results -- This removes any movies, episodes, music files, etc. that are inside the Downloads folder DELETE FROM BaseItems WHERE ParentId = 'DDA3FC7D-2094-7132-2527-EEA2ADB8DAF9'; -- ID of the Downloads Folder -- SECOND: Delete the Downloads folder itself -- Now that its children are gone, we can safely delete the folder -- Replace with the actual Downloads Folder ID from your search results DELETE FROM BaseItems WHERE Id = 'DDA3FC7D-2094-7132-2527-EEA2ADB8DAF9'; -- Downloads Folder under /media/WD4GB-1/Downloads -- THIRD: Delete the Downloads CollectionFolder (library) -- Replace with the actual Downloads library ID from your search results -- This removes the library entry from Jellyfin's library list DELETE FROM BaseItems WHERE Id = '08DA936D-C99A-3E5F-30BD-B6AA1FE6D1A7'; -- Downloads library under /config/root/default/Downloads -- Save all changes to the database -- Only run this if you're sure you want to delete everything! -- If you want to undo, type ROLLBACK; instead of COMMIT; COMMIT; ``` 6. Verify they're gone ``` -- Double-check that the specific Downloads items are gone -- This query should return zero results if deletion was successful SELECT Id, -- Item ID Name, -- Item name Type, -- Item type Path -- File path FROM BaseItems WHERE Id IN ( '08DA936D-C99A-3E5F-30BD-B6AA1FE6D1A7', -- Downloads library 'DDA3FC7D-2094-7132-2527-EEA2ADB8DAF9' -- Downloads folder ); -- Should return nothing if deletion worked ``` 7. Exit from sqlite3 ``` .quit ``` 8. Start Jellyfin and add in the library I actually ran a lot more commands than that, where I searched for the first entry and then thought there could be more copies lying around. I can share those as well if its useful.
Author
Owner

@MrSimmo commented on GitHub (Nov 29, 2025):

Ok one more update - "Enable real time monitoring" seems to be very slow to bring new changes in files to the UI. For example, I make the change in the filesystem such as add a file or remove a file, it then takes hours for it to appear.

@MrSimmo commented on GitHub (Nov 29, 2025): Ok one more update - "Enable real time monitoring" seems to be very slow to bring new changes in files to the UI. For example, I make the change in the filesystem such as add a file or remove a file, it then takes hours for it to appear.
Author
Owner

@Zardoz8901 commented on GitHub (Jan 11, 2026):

I experienced the same issue on 10.11.5. Adding additional details that may help diagnose:

Root cause in my case: A series was renamed externally (files moved from /media/tv/Pointless Celebrities (2011) to /media/tv/Pointless (2009)). The old database entry became orphaned.

Key finding: The orphaned entry blocked the entire folder from being scanned. New series added to /media/tv were never discovered because scans were aborting on the orphan with:
[ERR] MediaBrowser.Controller.Entities.BaseItem: Error refreshing owned items for /media/tv/Pointless Celebrities (2011)

Why deletion fails: Attempting to delete via API returns 500 with:
SQLite Error 19: 'UNIQUE constraint failed: UserData.ItemId, UserData.UserId, UserData.CustomDataKey'
at Jellyfin.Server.Implementations.Item.BaseItemRepository.DeleteItem

The UI also incorrectly shows "You don't have access" for admin users trying to delete.

Workaround: Same as @MrSimmo - stop Jellyfin and manually delete from SQLite:

DELETE FROM BaseItems WHERE SeriesId = '<orphan-id>';
DELETE FROM BaseItems WHERE ParentId = '<orphan-id>';
DELETE FROM BaseItems WHERE Id = '<orphan-id>';
DELETE FROM AncestorIds WHERE ItemId = '<orphan-id>';

After this, library scans completed correctly and discovered all previously-missed content.

@Zardoz8901 commented on GitHub (Jan 11, 2026): I experienced the same issue on **10.11.5**. Adding additional details that may help diagnose: **Root cause in my case:** A series was renamed externally (files moved from `/media/tv/Pointless Celebrities (2011)` to `/media/tv/Pointless (2009)`). The old database entry became orphaned. **Key finding:** The orphaned entry blocked the entire folder from being scanned. New series added to `/media/tv` were never discovered because scans were aborting on the orphan with: [ERR] MediaBrowser.Controller.Entities.BaseItem: Error refreshing owned items for /media/tv/Pointless Celebrities (2011) **Why deletion fails:** Attempting to delete via API returns 500 with: SQLite Error 19: 'UNIQUE constraint failed: UserData.ItemId, UserData.UserId, UserData.CustomDataKey' at Jellyfin.Server.Implementations.Item.BaseItemRepository.DeleteItem The UI also incorrectly shows "You don't have access" for admin users trying to delete. **Workaround:** Same as @MrSimmo - stop Jellyfin and manually delete from SQLite: ```sql DELETE FROM BaseItems WHERE SeriesId = '<orphan-id>'; DELETE FROM BaseItems WHERE ParentId = '<orphan-id>'; DELETE FROM BaseItems WHERE Id = '<orphan-id>'; DELETE FROM AncestorIds WHERE ItemId = '<orphan-id>'; ``` After this, library scans completed correctly and discovered all previously-missed content.
Author
Owner

@fperilleux commented on GitHub (Jan 17, 2026):

Hi everyone,

First of all, a massive thank you to @MrSimmo and @Zardoz8901. Your investigation into the "orphaned database entries" was spot on. I had the exact same issue after renaming folders directly on my server: the scan would just hang or fail because the database was holding onto the old paths.

However, I must admit I am not technical enough to comfortably run SQL commands or use the CLI. I managed to apply your fix using a visual method (GUI) on my PC, and I thought I would share it here for others who might be intimidated by code.

Here is how to clean the database using a free tool called DB Browser for SQLite:

  1. Stop and Backup
    Stop your Jellyfin container/server.
    Locate your jellyfin.db file (usually in /config/data/ or /appdata/jellyfin/data/).
    Copy this file to your desktop and make a backup copy (e.g., jellyfin.db.backup) before touching anything.

  2. Open the Database
    Download and install DB Browser for SQLite (it's free and open source).
    Open your local copy of jellyfin.db with the software.

  3. Find the "Ghost" Entries
    Go to the "Browse Data" tab.
    In the "Table" dropdown, select BaseItems (as identified by MrSimmo).
    In the "Filter" box under the Path (or Name) column, type the name of the folder you renamed/removed that is causing issues (e.g., "The Collection Complete").
    You will likely see many rows corresponding to this old path that no longer exists.

  4. Delete and Save
    Select all these rows (Crtl+ A).
    Press Delete.
    Save

  5. Restore to Server
    Copy the modified jellyfin.db back to your server, overwriting the old one.
    Note for Unraid users: If you get a permission/access denied error when copying the file back, use the tool "New Perms" on your appdata share first.

Restart Jellyfin.

Run a "Replace all metadata" scan.

This worked perfectly for me to clear out the 200+ orphaned items blocking my scan. Thanks again to the experts above for pointing me in the right direction!

@fperilleux commented on GitHub (Jan 17, 2026): Hi everyone, First of all, a massive thank you to @MrSimmo and @Zardoz8901. Your investigation into the "orphaned database entries" was spot on. I had the exact same issue after renaming folders directly on my server: the scan would just hang or fail because the database was holding onto the old paths. However, I must admit I am not technical enough to comfortably run SQL commands or use the CLI. I managed to apply your fix using a visual method (GUI) on my PC, and I thought I would share it here for others who might be intimidated by code. Here is how to clean the database using a free tool called DB Browser for SQLite: 1. Stop and Backup Stop your Jellyfin container/server. Locate your jellyfin.db file (usually in /config/data/ or /appdata/jellyfin/data/). Copy this file to your desktop and make a backup copy (e.g., jellyfin.db.backup) before touching anything. 2. Open the Database Download and install DB Browser for SQLite (it's free and open source). Open your local copy of jellyfin.db with the software. 3. Find the "Ghost" Entries Go to the "Browse Data" tab. In the "Table" dropdown, select BaseItems (as identified by MrSimmo). In the "Filter" box under the Path (or Name) column, type the name of the folder you renamed/removed that is causing issues (e.g., "The Collection Complete"). You will likely see many rows corresponding to this old path that no longer exists. 4. Delete and Save Select all these rows (Crtl+ A). Press Delete. Save 5. Restore to Server Copy the modified jellyfin.db back to your server, overwriting the old one. Note for Unraid users: If you get a permission/access denied error when copying the file back, use the tool "New Perms" on your appdata share first. Restart Jellyfin. Run a "Replace all metadata" scan. This worked perfectly for me to clear out the 200+ orphaned items blocking my scan. Thanks again to the experts above for pointing me in the right direction!
Author
Owner

@HammyHavoc commented on GitHub (Jan 26, 2026):

Somebody should write a plugin or append to the core Jellyfin project to have an analysis function to list and repair database issues like orphans (or better yet, change how it handles them...).

@HammyHavoc commented on GitHub (Jan 26, 2026): Somebody should write a plugin or append to the core Jellyfin project to have an analysis function to list and repair database issues like orphans (or better yet, change how it handles them...).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#7779