# Plex not adding or removing files

**URL:** <https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681>\
**Category:** Metadata & Adding Files\
**Tags:** server-linux, library-management\
**Created:** [March 21, 2025, 9:50am UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681 "2025-03-21T09:50:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![alwin75](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/alwin75/32/289025_2.png) [@alwin75](https://forums.plex.tv/u/alwin75)\
**Post date:** [March 21, 2025, 9:50am UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/1 "2025-03-21T09:50:24Z")

</div>

Server Version#: 1.41.5.9522-a96edc606-ls259 (Unraid Docker)  
Player Version#: Web browser

Dear Plex community

I have a weird issue since two days. Suddenly Plex stopped adding new episodes to my TV Show library. I tried the [Plex Dance](https://forums.plex.tv/t/the-plex-dance/197064), but realised that it does also not remove any files.

If I remove files it will just say unavailable but not play it.

If I create a new library and add the same folders everything appears.

It seems that one library is bugged.

File naming and permissions are the same and since adding them in a new library seems to work.

I would appreciate any help.

BR  
Alwin

---

<div class="post-metadata">

**Author:** ![alwin75](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/alwin75/32/289025_2.png) [@alwin75](https://forums.plex.tv/u/alwin75)\
**Post date:** [March 21, 2025, 10:15am UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/2 "2025-03-21T10:15:10Z")

</div>

I may try deleting the database and recovering from an old one.

Best regards

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [March 21, 2025, 1:09pm UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/3 "2025-03-21T13:09:09Z")

</div>

> [@alwin75](#):
>
> I have a weird issue since two days. Suddenly Plex stopped adding new episodes to my TV Show library. I tried the [Plex Dance](https://forums.plex.tv/t/the-plex-dance/197064), but realised that it does also not remove any files.

How many directories do you have indexed ?

On Linux, depending on kernel, the default limit is 65536 directories which can be monitored (kernel inotify service).

PMS uses the inotify service to automatically detect changes.

If you’ve exceeded the host’s table size then you need to increase the table.  
Rebuilding PMS won’t buy you anything

Without seeing logs, you might also have a damaged DB.

---

<div class="post-metadata">

**Author:** ![alwin75](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/alwin75/32/289025_2.png) [@alwin75](https://forums.plex.tv/u/alwin75)\
**Post date:** [March 21, 2025, 3:29pm UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/4 "2025-03-21T15:29:12Z")

</div>

Hahaha no around 400 directories (TV Shows) and 1738 folders in total (according to windows porperties).

Looking at my logs, it does seem that the DB is corrupted:

 ![image](https://global.discourse-cdn.com/plex/original/4X/2/3/b/23b7d0ef3938afb808aea05cda607377b38ec8e7.png)

I will try and restore one from an older version. Is there any version to fix a corrupted one or is restoring the best option?

[https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/](https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/)

I would follow this guide? Or is there an easier one?

Thanks!

BR

---

<div class="post-metadata">

**Author:** ![alwin75](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/alwin75/32/289025_2.png) [@alwin75](https://forums.plex.tv/u/alwin75)\
**Post date:** [March 21, 2025, 3:34pm UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/5 "2025-03-21T15:34:05Z")

</div>

Funnily enough the DB backup is also quite old, eventhough backup every three days is enabled in the settings.

 ![image](https://global.discourse-cdn.com/plex/original/4X/f/2/f/f2f72b9a8ce2077b351e3542754bf77e65cabec3.png)

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [March 21, 2025, 3:48pm UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/6 "2025-03-21T15:48:32Z")

</div>

I have a tool which can repair certain DB problems.

It might be able to help.

It can’t repair those cases where the data in the fields is damaged (it’s not PMS).  
It can remove damaged records so PMS can rebuild them.

Given PMS backups are old, that tells us when the DB became damaged.  
(PMS cannot backup a damaged DB)

> **[GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server...](https://github.com/ChuckPa/PlexDBRepair)**
>
> Database repair utility for Plex Media Server databases

Consider this .  
It can also make replacing the DB easier.

---

<div class="post-metadata">

**Author:** ![alwin75](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/alwin75/32/289025_2.png) [@alwin75](https://forums.plex.tv/u/alwin75)\
**Post date:** [March 21, 2025, 4:17pm UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/7 "2025-03-21T16:17:46Z")

</div>

Thanks!

I recovered the old 2025-01-15 (I assumed the 18 may be corrupted) and rescanned all the libraries. It is finding them all again.

Should I rerun the repair utility then on the fixed DB just to see if there are any issues? Using the automatic mode?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [March 21, 2025, 4:19pm UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/8 "2025-03-21T16:19:25Z")

</div>

After it’s all done, running Auto will put the DBs in pristine order  
(tables resequenced and indexes rebuilt)

You’ll immediately spot pages load quicker and search is way faster

---

<div class="post-metadata">

**Author:** ![alwin75](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/alwin75/32/289025_2.png) [@alwin75](https://forums.plex.tv/u/alwin75)\
**Post date:** [March 21, 2025, 4:26pm UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/9 "2025-03-21T16:26:14Z")

</div>

Damn you were a massive help!

Thanks a lot \<3

Its the second time in a year it has corrupted. It is weird. I have duplicity (backup) running daily, so worst case I can also recover it another way, but I need to check if I can setup an alert, when the backups are not being created anymore, or run your utility every few months.  
Would that cause any issues?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [March 21, 2025, 4:41pm UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/10 "2025-03-21T16:41:27Z")

</div>

Part of that corruption detection (and fixing) is why I wrote the script.

It can run daily (cron job with command line arguments).  
The exit status will tell you if it’s failed and couldn’t recover successfully  
That would be the trigger to send yourself notification.

Otherwise, you have a daily/weekly/monthly automatic check & optimize of the DBs

Consider:

```auto
./DBRepair.sh stop auto start exit
Result=$?
[$Result -ne 0] && Do Something Here passing $Result.

```

You might want to look at the README.md file. I’ve got some documentation there (yes, I should write more. haha)

---

<div class="post-metadata">

**Author:** ![alwin75](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/alwin75/32/289025_2.png) [@alwin75](https://forums.plex.tv/u/alwin75)\
**Post date:** [March 24, 2025, 8:24am UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/11 "2025-03-24T08:24:37Z")

</div>

The bane of every developer 😃

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [June 22, 2025, 8:24am UTC](https://forums.plex.tv/t/plex-not-adding-or-removing-files/909681/12 "2025-06-22T08:24:55Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
