# Unable to delete libraries

**URL:** <https://forums.plex.tv/t/unable-to-delete-libraries/635370>\
**Category:** Plex Media Server\
**Tags:** server-linux, server-terramaster\
**Created:** [September 20, 2020, 5:14pm UTC](https://forums.plex.tv/t/unable-to-delete-libraries/635370 "2020-09-20T17:14:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pookexvi](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@pookexvi](https://forums.plex.tv/u/pookexvi)\
**Post date:** [September 20, 2020, 5:14pm UTC](https://forums.plex.tv/t/unable-to-delete-libraries/635370/1 "2020-09-20T17:14:42Z")

</div>

Server Version#: 4.30.2  
[Plex Media Server Logs\_2020-09-20\_10-02-32.zip](https://forums.plex.tv/uploads/short-url/h74skeiNRGOP44Jsk97z0De8okH.zip) (3.6 MB)  
I’m currently unable to delete any libraries, I tried making a new one that works yet unable to delete that one now. I tried moving the file locations, scanning, emptying the trash can, optimizing the database. nothing seems to work. I tell it to delete the libraries seems to work for only a fraction of a second then it comes right back. I have attached my logs. hopefully, someone on here can help, my server doesnt seem to want to work.

---

<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:** [September 20, 2020, 5:33pm UTC](https://forums.plex.tv/t/unable-to-delete-libraries/635370/2 "2020-09-20T17:33:46Z")

</div>

The database is damaged.  
You can use one of the backup databases.

```auto
Sep 20, 2020 10:01:31.531 [0x7f76183bc700] DEBUG - Auth: authenticated user 1 as pookexvi
Sep 20, 2020 10:01:31.570 [0x7f75eae6b700] DEBUG - It took 120.000000 ms to retrieve 832 items.
Sep 20, 2020 10:01:31.584 [0x7f75e8e31700] DEBUG - It took 140.000000 ms to retrieve 35 items.
Sep 20, 2020 10:01:31.586 [0x7f75e8e31700] DEBUG - Setting container serialization range to [16, 50] (total=1627)
Sep 20, 2020 10:01:31.601 [0x7f76183bc700] ERROR - SQLITE3:(nil), 11, database corruption at line 64757 of [bf8c1b2b7a]
Sep 20, 2020 10:01:31.601 [0x7f76183bc700] ERROR - SQLITE3:(nil), 11, database corruption at line 64798 of [bf8c1b2b7a]
Sep 20, 2020 10:01:31.601 [0x7f76183bc700] ERROR - SQLITE3:(nil), 11, statement aborts at 38: [select media_items.id as 'media_items_id', media_items.library_section_id as 'media_items_library_section_id', media_items.section_location_id as 'media_items_section_location_id', med
Sep 20, 2020 10:01:31.602 [0x7f76183bc700] ERROR - Soci Exception handled: sqlite3_statement_backend::loadRS: database disk image is malformed
Sep 20, 2020 10:01:31.603 [0x7f761a939700] DEBUG - Completed: [192.168.1.5:54646] 500 GET /photo/:/transcode?width=140&height=210&minSize=1&upscale=1&url=%2Flibrary%2Fmetadata%2F70740%2Fthumb%2F1599334208%3FX-Plex-Token%3Dxxxxxxxxxxxxxxxxxxxx (12 live) TLS GZIP 98ms 484 bytes (pipelined: 1)
Sep 20, 2020 10:01:31.607 [0x7f761a64b700] DEBUG - Auth: authenticated user 1 as pookexvi
Sep 20, 2020 10:01:31.607 [0x7f76183bc700] DEBUG - Request: [192.168.1.5:54646 (Subnet)] GET /photo/:/transcode?width=140&height=210&minSize=1&upscale=1&url=%2Flibrary%2Fmetadata%2F70741%2Fthumb%2F1599334210%3FX-Plex-Token%3Dxxxxxxxxxxxxxxxxxxxx (12 live) TLS GZIP Signed-in Token (pookexvi)

```

> **[Repair a Corrupt Database | Plex Support](https://support.plex.tv/articles/201100678-repair-a-corrupt-database/)**
>
> Though rare, it is possible for your main Plex Media Server database to become corrupted. For instance, it might happen...

---

<div class="post-metadata">

**Author:** ![pookexvi](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@pookexvi](https://forums.plex.tv/u/pookexvi)\
**Post date:** [September 20, 2020, 5:52pm UTC](https://forums.plex.tv/t/unable-to-delete-libraries/635370/3 "2020-09-20T17:52:38Z")

</div>

i have a teramaster NAS i have no idea how to get sqlite on to it to be able to do the commands, thats the problem im currently running into.

---

<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:** [December 19, 2020, 5:52pm UTC](https://forums.plex.tv/t/unable-to-delete-libraries/635370/4 "2020-12-19T17:52:44Z")

</div>

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