Reduce DB Size on MacOS

Server Version#: 1.43.0.10232
Player Version#:
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>

I wanted to upgrade my MacOS today and noticed I dont have a lot of space left. Then I noticed that the Plex DB uses 30GB - add the backups it creates and I end up in the 150-200 GB range.

I have around 800 movies and 130 series - so not small but is 30GB really expected for that?!

Its the com.plexapp.plugins.library.db and there are a couple of versions from May 2025 (so actually they do not look like backups that are made on a regular basis). I guess I can delete those..

Optimizing database did not help…

Try this: GitHub - ChuckPa/DBRepair: Database repair utility for Plex Media Server databases

You will be looking at option 23

2 Likes

Thank you - am trying this (currently checking for issues which is already taking 30mins with lots of disk activity).

I also found this thread https://support.plex.tv/articles/202529153-why-is-my-plex-media-server-directory-so-large/ and it might be related - I think my statistics_bandwidth table is massive. Even executing select count(*) from statistics_bandwidth takes forever (I aborted it after 20mins)…

Checking will take forever

I recommend you just run option 23 first, and then you can do an Auto

All with a valid backup of the database !

1 Like

I believe this worked - DB went from 32GB to 280MB…wow.

Plex is running again, will do some more rescans/refreshes and testing, but I think that did the trick. Amazing, thank you!

2 Likes

Don’t thank me, since credits need to go to @ChuckPa :heart_eyes: