/Databases directory seems to be loaded with old temp files, may I delete them?

I realized I have over 200 GB of files in my Databases folder. They appear to be temporary files.

I do have my db set to auto-back-up every 3 days – those files are copied to a share on my NAS and I only see 3 backups kept, as expected. It looks like Plex is keeping its own copies, though, which are taking up a lot of space on the PMS boot drive.

Can I delete these -tmp files, and is there a way I can have them cleaned up automatically?

Here’s a small sample of the directory listing.

foo@bar:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases$ ll
total 224989460
drwxr-xr-x 4 plex plex      24576 Aug 12 10:40  ./
drwxr-xr-x 7 plex plex       4096 Apr  2 23:30  ../
-rw-r--r-- 1 plex plex    3035136 Aug 12 10:27  com.plexapp.dlna.db
-rw-r--r-- 1 plex plex      32768 Aug 12 10:27  com.plexapp.dlna.db-shm
-rw-r--r-- 1 plex plex    3275432 Aug 12 10:27  com.plexapp.dlna.db-wal
-rw-r--r-- 1 plex plex 1417372672 Aug 12 10:27  com.plexapp.plugins.library.blobs.db
-rw-r--r-- 1 plex plex  535690240 Apr  2 23:29  com.plexapp.plugins.library.blobs.db-2021-09-15
-rw-r--r-- 1 plex plex  684163072 Apr  2 23:29  com.plexapp.plugins.library.blobs.db-2021-09-17
-rw-r--r-- 1 plex plex  810438656 Apr  2 23:27  com.plexapp.plugins.library.blobs.db-2021-09-18
-rw-r--r-- 1 plex plex 1076222976 Apr  2 23:30  com.plexapp.plugins.library.blobs.db-2021-09-20-tmp
-rw-r--r-- 1 plex plex 1079023616 Apr  2 23:30  com.plexapp.plugins.library.blobs.db-2021-09-21-tmp
-rw-r--r-- 1 plex plex 1068121088 Apr  2 23:30  com.plexapp.plugins.library.blobs.db-2021-09-24-tmp
-rw-r--r-- 1 plex plex 1072816128 Apr  2 23:30  com.plexapp.plugins.library.blobs.db-2021-09-27-tmp

Those are your most recent backups.

PMS normally recycles and cleans up after itself.

The -tmp files only remain when there is a failure while making the backup.

This tells us you have some damage in the DB which should be repaired before it completely fails and you lose your data.

When you stated:

Do you remove those backups after copying them?
They should be present in the databases directory under normal circumstances.

In the PMS settings, I put in a path to a NAS share, and I see only recent backups in that directory.

(It is on another volume than the boot drive & PMS, so if my server melts down, the backups are elsewhere.)

But, in the PMS hierarchy on the boot drive, I have all these temp files. Thx for confirming they should be cleaned up–I nuked them manually.

I looked up the instructions for how to check the db for errors and PRAGMA integrity_check; says the db is OK.

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