# Deleted mp3 files not removed from library

**URL:** <https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672>\
**Category:** Metadata & Adding Files\
**Tags:** server-linux\
**Created:** [April 29, 2020, 1:50pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672 "2020-04-29T13:50:58Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![danBhentschel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/danbhentschel/32/14641_2.png) [@danBhentschel](https://forums.plex.tv/u/danBhentschel)\
**Post date:** [April 29, 2020, 1:50pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/1 "2020-04-29T13:50:58Z")

</div>

Server Version#: 1.19.2.2737  
Player Version#: Plex Web 4.32.1

This morning I deleted almost 500 mp3 files from my hard drive. I then did a Scan Library Files on my Music library. Only about 20 tracks disappeared from the library. I can browse to the other tracks in the Plex player, and when I try to play them, I get an error. Makes sense since they’re not there.

If I select Delete on the track through Plex Web, then it goes away. It would be a significant effort to manually delete all of the removed tracks through the Web UI, though. Any thoughts as to why a Scan is not removing these tracks?

- danBhentschel

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 29, 2020, 2:07pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/2 "2020-04-29T14:07:52Z")

</div>

Inspect the ‘Add Folders’ tab when you edit yoru music library.  
Does any one of the folder paths in there now point to a folder that is no longer there or is completely empty?

---

<div class="post-metadata">

**Author:** ![danBhentschel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/danbhentschel/32/14641_2.png) [@danBhentschel](https://forums.plex.tv/u/danBhentschel)\
**Post date:** [April 29, 2020, 2:12pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/3 "2020-04-29T14:12:22Z")

</div>

Thanks. I just looked through all the folders. Every folder is still there and has music files in it. Anything else to check?

- danBhentschel

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 29, 2020, 2:13pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/4 "2020-04-29T14:13:42Z")

</div>

Does  
‘Scan library files’  
followed by (only after the scan has finished!) ‘empty trash’  
do anything?

---

<div class="post-metadata">

**Author:** ![danBhentschel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/danbhentschel/32/14641_2.png) [@danBhentschel](https://forums.plex.tv/u/danBhentschel)\
**Post date:** [April 29, 2020, 2:14pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/5 "2020-04-29T14:14:42Z")

</div>

It tells me “Trash was emptied” but the files are still there.

- danBhentschel

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 29, 2020, 2:16pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/6 "2020-04-29T14:16:06Z")

</div>

Are you using any “mergeFS” or other exotic ways to mount your media storage?

---

<div class="post-metadata">

**Author:** ![danBhentschel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/danbhentschel/32/14641_2.png) [@danBhentschel](https://forums.plex.tv/u/danBhentschel)\
**Post date:** [April 29, 2020, 2:20pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/7 "2020-04-29T14:20:49Z")

</div>

I guess possibly… Plex is running in an LXC container. The media is in a ZFS pool managed by the host OS. The storage is mounted in the LXC config file. Not sure what mounting technology is used under the hood.

- danBhentschel

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 29, 2020, 2:24pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/8 "2020-04-29T14:24:21Z")

</div>

(With my limited Linux knowledge) I think you are good with ZFS. It is used by many people in conjunction with Plex.

If you have ‘debug logging’ activated in your Plex server, let it do another scan of the music library (and _only_ the music library please!), then let it finish the scan (can sometimes take quite long, with a large library), then fetch the logs (whole ZIP please) and post it here.

---

<div class="post-metadata">

**Author:** ![danBhentschel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/danbhentschel/32/14641_2.png) [@danBhentschel](https://forums.plex.tv/u/danBhentschel)\
**Post date:** [April 29, 2020, 2:35pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/9 "2020-04-29T14:35:32Z")

</div>

Okay, scan finished. Thanks for looking at this…

[Plex Media Server Logs\_2020-04-29\_10-34-09.zip](https://forums.plex.tv/uploads/short-url/yirO8FlcrPul5FwOlki4ECrYXBb.zip) (26.7 MB)

- danBhentschel

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 29, 2020, 2:42pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/10 "2020-04-29T14:42:46Z")

</div>

Do you have a path or filename from one of the deleted items, please?  
I am trying to find the right log file, even though you have alredy 30 versions in there. (which is great!)

---

<div class="post-metadata">

**Author:** ![danBhentschel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/danbhentschel/32/14641_2.png) [@danBhentschel](https://forums.plex.tv/u/danBhentschel)\
**Post date:** [April 29, 2020, 2:46pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/11 "2020-04-29T14:46:04Z")

</div>

So I’ve been looking through the log a bit after sending it to you. Here is a file of interest:

```
/storage/music/cool_rock/Enter the Haggis/Gutter Anthems/12 Bury My Demons.mp3

```

I can see this one mentioned in the log file:

```
Apr 29, 2020 10:29:55.774 [0x7ffb073dc700] DEBUG - File '/storage/music/cool_rock/Enter the Haggis/Gutter Anthems/12 Bury My Demons.mp3' didn't exist, can't skip.

```

So it recognized that the file doesn’t exist, but it doesn’t remove it from the library.

- danBhentschel

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 29, 2020, 6:00pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/12 "2020-04-29T18:00:38Z")

</div>

Say, do you have several music libraries?  
If so, is any of these folders included in more than one library?

```auto
/storage/music/amazon/
/storage/music/cool_rock

```

---

<div class="post-metadata">

**Author:** ![danBhentschel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/danbhentschel/32/14641_2.png) [@danBhentschel](https://forums.plex.tv/u/danBhentschel)\
**Post date:** [April 29, 2020, 8:02pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/13 "2020-04-29T20:02:51Z")

</div>

I have 3 music libraries. The other two are for Christmas music and for school-related music / audio files. Neither of the other libraries overlaps on folders. Each of the other 2 libraries has their own folder for media files.

- danBhentschel

---

<div class="post-metadata">

**Author:** ![danBhentschel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/danbhentschel/32/14641_2.png) [@danBhentschel](https://forums.plex.tv/u/danBhentschel)\
**Post date:** [April 30, 2020, 1:28pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/14 "2020-04-30T13:28:36Z")

</div>

Thanks for your help up to this point. I’ve decided to just bite the bullet and go through my collection deleting the files manually. It won’t take forever.

I have saved off the database in the “weird” state, in case anyone is motivated to contact me for additional debugging in the future. I have also noticed another oddity while manually removing the offending tracks. Some of my albums (especially video game music) have lost the title to all tracks EXCEPT for the files that I deleted. Not sure if this is a clue or not. It’s easy to get the info back by refreshing metadata.

Here is a video illustrating what I mean:

- danBhentschel

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 30, 2020, 1:33pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/15 "2020-04-30T13:33:21Z")

</div>

Yes, this behaviour is known for albums without a “match”. The cause of which is still unclear, because it is very hard to reproduce and catch evidence in log files.  
So far, it is assumed that it happens during the nightly metadata refreshes in Scheduled Tasks.

---

<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:** [July 29, 2020, 1:33pm UTC](https://forums.plex.tv/t/deleted-mp3-files-not-removed-from-library/582672/16 "2020-07-29T13:33:31Z")

</div>

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