# Plex Database is massive after recent updates

**URL:** <https://forums.plex.tv/t/plex-database-is-massive-after-recent-updates/919969>\
**Category:** Plex Pass Betas\
**Tags:** server-windows\
**Created:** [May 25, 2025, 2:37am UTC](https://forums.plex.tv/t/plex-database-is-massive-after-recent-updates/919969 "2025-05-25T02:37:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![freezegunn47](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/freezegunn47/32/281305_2.png) [@freezegunn47](https://forums.plex.tv/u/freezegunn47)\
**Post date:** [May 25, 2025, 2:37am UTC](https://forums.plex.tv/t/plex-database-is-massive-after-recent-updates/919969/1 "2025-05-25T02:37:28Z")

</div>

Server Version#: 1.41.7.9823

I noticed in my backups folder my PLEX database has grown 20Gb out of the blue with the last few beta pass updates. I’ve not added more than a few movies or show episodes in the last week or anything that would cause this kind of massive growth.

Does anyone know how I can clean this up or “fix” the size? I can’t run the Optimize function either now, the entire server just hangs and eventually freezes/stops loading.

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

---

<div class="post-metadata">

**Author:** ![DTR](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@DTR](https://forums.plex.tv/u/DTR)\
**Post date:** [May 25, 2025, 3:02am UTC](https://forums.plex.tv/t/plex-database-is-massive-after-recent-updates/919969/2 "2025-05-25T03:02:59Z")

</div>

There was a bug in a recent beta that caused the database size to explode. See [Library.db size more than doubled in latest version - #64 by drzoidberg33](https://forums.plex.tv/t/library-db-size-more-than-doubled-in-latest-version/918851/64)

The workaround has also been integrated into DBRepair: [GitHub - ChuckPa/DBRepair: Database repair utility for Plex Media Server databases](https://github.com/ChuckPa/DBRepair)

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [May 25, 2025, 3:06am UTC](https://forums.plex.tv/t/plex-database-is-massive-after-recent-updates/919969/3 "2025-05-25T03:06:40Z")

</div>

Very long thread on the topic: [Library.db size more than doubled in latest version](https://forums.plex.tv/t/library-db-size-more-than-doubled-in-latest-version/918851/)

Earlier versions of 1.41.7 have a bug resulting in massive database growth.

You can either (a) fall back to a database backup, or (b) manually remove the unnecessary data from the database file.

The thread mentions multiple options to delete the data.

This worked on my PC: [Library.db size more than doubled in latest version - #186 by FordGuy61](https://forums.plex.tv/t/library-db-size-more-than-doubled-in-latest-version/918851/186)

This option does the same thing and appears to be much faster: [Library.db size more than doubled in latest version - #188 by hlve](https://forums.plex.tv/t/library-db-size-more-than-doubled-in-latest-version/918851/188)

---

<div class="post-metadata">

**Author:** ![freezegunn47](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/freezegunn47/32/281305_2.png) [@freezegunn47](https://forums.plex.tv/u/freezegunn47)\
**Post date:** [May 25, 2025, 4:40pm UTC](https://forums.plex.tv/t/plex-database-is-massive-after-recent-updates/919969/4 "2025-05-25T16:40:04Z")

</div>

Thank you thank thank you! I’ll be doing this today the moment I can get my husband off Fantasy Life for five minutes…

---

<div class="post-metadata">

**Author:** ![freezegunn47](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/freezegunn47/32/281305_2.png) [@freezegunn47](https://forums.plex.tv/u/freezegunn47)\
**Post date:** [May 27, 2025, 5:12pm UTC](https://forums.plex.tv/t/plex-database-is-massive-after-recent-updates/919969/5 "2025-05-27T17:12:37Z")

</div>

For anyone coming behind me looking for a solution, the DBRepair tools did _not_ shrink the database back down. What worked was running these commands manually (you may have to adjust DB location if you stored it somewhere else). Shrunk my 24Gb database back to 2Gb in moments.

```auto
c:\>"C:\Program Files\Plex\Plex Media Server\Plex SQLite.exe" "%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db"
sqlite> delete from statistics_bandwidth where account_id is NULL;
sqlite> VACUUM;
sqlite> .quit

```

From this: [Post from FordGuy61](https://forums.plex.tv/t/library-db-size-more-than-doubled-in-latest-version/918851/186)

---

<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:** [May 27, 2025, 6:59pm UTC](https://forums.plex.tv/t/plex-database-is-massive-after-recent-updates/919969/6 "2025-05-27T18:59:59Z")

</div>

> [@freezegunn47](#):
>
> the DBRepair tools did _not_ shrink the database back down.

AFAIK not both Windows versions might contain the necessary commands. And you’d need to download the latest version, not use one that you may have downloaded up to a few days ago.

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [May 27, 2025, 7:11pm UTC](https://forums.plex.tv/t/plex-database-is-massive-after-recent-updates/919969/7 "2025-05-27T19:11:53Z")

</div>

As @OttoKerner mentions, download the current Windows version.

“delete from statistics\_bandwidth…” has now been added to both the .bat and .ps1 versions.

> **[DBRepair/Windows at master · ChuckPa/DBRepair](https://github.com/ChuckPa/DBRepair/tree/master/Windows)**
>
> Database repair utility for Plex Media Server databases - ChuckPa/DBRepair

---

<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:** [August 25, 2025, 7:12pm UTC](https://forums.plex.tv/t/plex-database-is-massive-after-recent-updates/919969/8 "2025-08-25T19:12:01Z")

</div>

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