# Why am I getting errors adding, deleting items in the library?

**URL:** <https://forums.plex.tv/t/why-am-i-getting-errors-adding-deleting-items-in-the-library/177500>\
**Category:** General Discussions\
**Created:** [January 27, 2017, 9:07pm UTC](https://forums.plex.tv/t/why-am-i-getting-errors-adding-deleting-items-in-the-library/177500 "2017-01-27T21:07:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![treemok](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/treemok/32/2482_2.png) [@treemok](https://forums.plex.tv/u/treemok)\
**Post date:** [January 27, 2017, 9:07pm UTC](https://forums.plex.tv/t/why-am-i-getting-errors-adding-deleting-items-in-the-library/177500/1 "2017-01-27T21:07:17Z")

</div>

Hello,

I already posted in the general area but I not getting any responses/help.

I’m suddenly running into all kinds of issues. I can’t delete certain items, can’t delete trash in some libraries, can’t play some items, some libraries don’t add new items. Attached are the logs.  
I already tried some techniques to “repair” the library with no success. I also tried adding new library but the server is not even scanning any new items anymore. The library stays empty even though I’ve selected folders with dozens of shows.  
I’ve been using Plex since the early days and never had an issue like this. I don’t want to delete everything and restart.  
Any help would really be appreciated!

Attached are the logs.

---

<div class="post-metadata">

**Author:** ![treemok](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/treemok/32/2482_2.png) [@treemok](https://forums.plex.tv/u/treemok)\
**Post date:** [January 28, 2017, 8:35pm UTC](https://forums.plex.tv/t/why-am-i-getting-errors-adding-deleting-items-in-the-library/177500/3 "2017-01-28T20:35:13Z")

</div>

Thanks Andy!

That solved my problems. I actually had a system backup from three weeks ago and I followed your instructions restoring a database backup. All working now again. 🙂

---

<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:** [January 28, 2017, 8:39pm UTC](https://forums.plex.tv/t/why-am-i-getting-errors-adding-deleting-items-in-the-library/177500/4 "2017-01-28T20:39:43Z")

</div>

You should still try and perform the database repairing procedure on that backup.  
It is quite possible, that the database corruption is already growing inside this as well.  
Make sure to stop Plex Server completely before attempting the repair procedure.

[https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database](https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database)

updated instructions for newer SQLite3 versions:

```auto
OSX
---

sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db "PRAGMA integrity_check"

sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db .dump > dump.sql

mv ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db.original

sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db < dump.sql

```

---

<div class="post-metadata">

**Author:** ![treemok](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/treemok/32/2482_2.png) [@treemok](https://forums.plex.tv/u/treemok)\
**Post date:** [January 30, 2017, 5:49pm UTC](https://forums.plex.tv/t/why-am-i-getting-errors-adding-deleting-items-in-the-library/177500/5 "2017-01-30T17:49:15Z")

</div>

> @OttoKerner said:  
> You should still try and perform the database repairing procedure on that backup.

I did that yesterday after I encountered another issue playing a show. Everything is running fine now. Thanks for your tip!

---

<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:** [January 7, 2020, 10:39pm UTC](https://forums.plex.tv/t/why-am-i-getting-errors-adding-deleting-items-in-the-library/177500/6 "2020-01-07T22:39:26Z")

</div>


