Move Metadata for Ubuntu Plex

Server Version#: 1.42.2.10156

Is there a way to move the metadata and thumbnails to another location for Ubuntu/Linux plex? It seems to be using up the whole drive. All my media is stored on a NAS that mapped so I like to do something similar with the thumbnails and metadata. I’ve seen references to just mapping the drive to one of the folders that the thumbnails use but I would love to see if there a way to just point the data to a new folder instead.

Moving just thumbnails and metadata usually doesn’t solve the whole problem.
It’s usually best, and definitely easier / less complicated, to move the entire PMS “AppSuppDir” (directory where PMS resides) to a new location.

How skilled are you with the Linux command line (1-10 scale) ?

I can show you what you’ll need to do.

If you’ll share where PMS is currently stored (default is /var/lib/plexmediaserver)
and where you want to move it to,

I’ll gladly show you how to do it easily & most efficiently.

Once it’s moved, we simply create a local configuration configuration file (a systemd override.conf file to specify the new location.

One procedure for moving and configuring is shown here:

The directory you use is your choice as long as you perform all the steps.

If you have questions, PLEASE don’t hesitate to ask.

PS: Given you’re having a space problem, I’d like to ask how big your databases are. Are they bloated / very large ? (this was a bug in PMS 1.41.6 & 1.41.7 )

I’m about a 6

The /var/lib/plexmediaserver/Library/Application Support/Plex Media Server folder is taking up about 73 Gigs of my harddrive (of 1 TB), the Media is 35.1, and Metadata is 23.4 while plugin support (DB in there right? is 13.6

I like to avoid moving the DB to the NAS because if something happens and nas is offline while Plex is online I don’t want it to freak out.

I would love to move the /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Media and /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata to /plex/Metadata and Media to /plex/Media

Moving the DB to the NAS will not work. The DB access is multi-threaded and requires record/file locking which network storage does not reliably support. Eventually you will end up with a corrupted DB.

If you go into the Databases directory, how big are the files? (ls -lah)
I ask because if your databases are 13GB then there is a problem. They should NEVER be that big unless you have 100+ TB of media. Do you?

( I have 75 TB of media. I do turn off those features I don’t use. My Databases directory, with all the backups and me playing in there, is only 5.5 GB. The databases themselves are only in the hundreds of MB.

[chuck@glockner Plex Media Server.1996]$ cd Plug-in\ Support/Databases/
[chuck@glockner Databases.1997]$ ls -lah
total 5.5G
drwxr-xr-x 2 plex plex 4.0K Nov 30 12:00 ./
drwxr-xr-x 7 plex plex  120 Apr 10  2025 ../
-rw-r--r-- 1 plex plex 382M Nov 27 02:03 com.plexapp.plugins.library.blobs.db
-rw-r--r-- 1 plex plex 382M Nov 20 02:10 com.plexapp.plugins.library.blobs.db-2025-11-20
-rw-r--r-- 1 plex plex 382M Nov 23 02:13 com.plexapp.plugins.library.blobs.db-2025-11-23
-rw-r--r-- 1 plex plex 382M Nov 26 02:06 com.plexapp.plugins.library.blobs.db-2025-11-26
-rw-r--r-- 1 plex plex 382M Nov 29 02:11 com.plexapp.plugins.library.blobs.db-2025-11-29
-rw-r--r-- 1 plex plex  32K Nov 30 12:00 com.plexapp.plugins.library.blobs.db-shm
-rw-r--r-- 1 plex plex    0 Nov 30 12:00 com.plexapp.plugins.library.blobs.db-wal
-rw-r--r-- 1 plex plex 599M Nov 30 15:42 com.plexapp.plugins.library.db
-rw-r--r-- 1 plex plex 593M Nov 20 02:06 com.plexapp.plugins.library.db-2025-11-20
-rw-r--r-- 1 plex plex 594M Nov 23 02:13 com.plexapp.plugins.library.db-2025-11-23
-rw-r--r-- 1 plex plex 596M Nov 26 02:03 com.plexapp.plugins.library.db-2025-11-26
-rw-r--r-- 1 plex plex 599M Nov 29 02:08 com.plexapp.plugins.library.db-2025-11-29
-rw-r--r-- 1 plex plex  32K Nov 30 15:55 com.plexapp.plugins.library.db-shm
-rw-r--r-- 1 plex plex 4.0M Nov 30 15:55 com.plexapp.plugins.library.db-wal
-rw-r--r-- 1 plex plex 5.5K Nov 17 21:09 DBRepair.log
-rw-r--r-- 1 root root 647M Sep 21 23:25 db.sql
[chuck@glockner Databases.1998]$ du -hs .
5.5G	.
[chuck@glockner Databases.1999]$

Regarding the target move location, /plex is in the root directory.
/var is also in the root . You won’t rebalance space utilization by moving PMS there.

Depending on how you partitioned the drive at install, a /home partition would be the best place.

As Example, look how I have my drives laid out.

efivarfs                  192K  116K   72K  63% /sys/firmware/efi/efivars
/dev/nvme0n1p2            122G   39G   84G  32% /
/dev/nvme0n1p1            499M   65M  434M  13% /boot/efi
/dev/nvme0n1p4            1.0T  538G  486G  53% /home
/dev/nvme2n1p1            931G  166G  766G  18% /sata
/dev/nvme2n1p2            932G  271G  661G  30% /usb
/dev/sda1                 932G  6.6G  925G   1% /user

Because I have NVME ssds, I put PMS on the /sata SSD.
It’s the same concept just a different name.

I have about 52T of media.

I think I may have some old backup files that could use cleaning up but not horrible with sizing

drwxrwxrwx 2 plex plex 4.0K Nov 30 19:26 .
drwxrwxrwx 7 plex plex 4.0K Sep  4  2024 ..
-rwxrwxrwx 1 plex plex 1.1M Sep  4  2024 com.plexapp.dlna.db
-rwxrwxrwx 1 plex plex  32K Sep  4  2024 com.plexapp.dlna.db-shm
-rwxrwxrwx 1 plex plex 1.1M Sep  4  2024 com.plexapp.dlna.db-wal
-rwxrwxrwx 1 plex plex 4.0K Sep  4  2024 com.plexapp.dlna-new.db
-rwxrwxrwx 1 plex plex  32K Sep  4  2024 com.plexapp.dlna-new.db-shm
-rwxrwxrwx 1 plex plex  77K Sep  4  2024 com.plexapp.dlna-new.db-wal
-rwxrwxrwx 1 plex plex 312M Sep  4  2024 com.plexapp.plugins.library-2022-02-19-manual.db
-rwxrwxrwx 1 plex plex 1.1G Sep  4  2024 com.plexapp.plugins.library.blobs-2022-02-19-manual.db
-rwxrwxrwx 1 plex plex 1.4G Nov 30 19:26 com.plexapp.plugins.library.blobs.db
-rw-r–r-- 1 plex plex 1.4G Nov 20 03:01 com.plexapp.plugins.library.blobs.db-2025-11-20
-rw-r–r-- 1 plex plex 1.4G Nov 23 03:32 com.plexapp.plugins.library.blobs.db-2025-11-23
-rw-r–r-- 1 plex plex 1.4G Nov 26 03:02 com.plexapp.plugins.library.blobs.db-2025-11-26
-rw-r–r-- 1 plex plex 1.4G Nov 29 03:02 com.plexapp.plugins.library.blobs.db-2025-11-29
-rwxrwxrwx 1 plex plex 1.1G Sep  4  2024 com.plexapp.plugins.library.blobs.db-old-2-27-2022
-rwxrwxrwx 1 plex plex  32K Nov 30 21:43 com.plexapp.plugins.library.blobs.db-shm
-rwxrwxrwx 1 plex plex 8.1M Sep  4  2024 com.plexapp.plugins.library.blobs.db-shm-2022-02-19-man
-rwxrwxrwx 1 plex plex  65K Nov 30 21:43 com.plexapp.plugins.library.blobs.db-wal
-rwxrwxrwx 1 plex plex 1.1G Sep  4  2024 com.plexapp.plugins.library.blobs.db-wal-2022-02-19-man
-rwxrwxrwx 1 plex plex 469M Nov 30 21:42 com.plexapp.plugins.library.db
-rwxrwxrwx 1 plex plex    0 Sep  4  2024 com.plexapp.plugins.library.db-2018-01-16-tmp
-rw-r–r-- 1 plex plex 477M Nov 20 03:00 com.plexapp.plugins.library.db-2025-11-20
-rw-r–r-- 1 plex plex 470M Nov 23 03:32 com.plexapp.plugins.library.db-2025-11-23
-rw-r–r-- 1 plex plex 471M Nov 26 03:02 com.plexapp.plugins.library.db-2025-11-26
-rw-r–r-- 1 plex plex 467M Nov 29 03:02 com.plexapp.plugins.library.db-2025-11-29
-rwxrwxrwx 1 plex plex 102M Sep  4  2024 com.plexapp.plugins.library.db-backup-3-7-2018
-rwxrwxrwx 1 plex plex 314M Sep  4  2024 com.plexapp.plugins.library.db-old-2-27-2022
-rwxrwxrwx 1 plex plex  32K Nov 30 21:48 com.plexapp.plugins.library.db-shm
-rwxrwxrwx 1 plex plex 2.5M Sep  4  2024 com.plexapp.plugins.library.db-shm-2022-02-19-man
-rwxrwxrwx 1 plex plex 5.3M Nov 30 21:47 com.plexapp.plugins.library.db-wal
-rwxrwxrwx 1 plex plex 319M Sep  4  2024 com.plexapp.plugins.library.db-wal-2022-02-19-man
-rw-r–r-- 1 root root 4.5K Sep  6  2024 DBRepair.log
-rw-r–r-- 1 plex plex  32M Nov 30 21:01 tv.plex.providers.epg.cloud-caf86b9b-3ce1-4b25-b6ae-1565a3a5dbd6.db
-rw-r–r-- 1 plex plex  32K Nov 30 21:36 tv.plex.providers.epg.cloud-caf86b9b-3ce1-4b25-b6ae-1565a3a5dbd6.db-shm
-rw-r–r-- 1 plex plex 1.1M Nov 30 21:31 tv.plex.providers.epg.cloud-caf86b9b-3ce1-4b25-b6ae-1565a3a5dbd6.db-wal

/plex is a smb mount from my nas so while I say /plex it actually setup in my /etc/fstab as going to /nas/misc/plex (a folder I setup there).

MODERATOR EDIT: Make console output more easily readable*
__used code (```) block formatting.

Using a network mount for PMS internals (anything under Plex Media Server) is not supported. It’s not supported because of the lack of file locking

What do you have for host-local storage (HDD or SSD) where you could relocate PMS ?

Your Databases directory could use a little cleanup but it’s not terrible . :white_check_mark:
I was concerned the actual .DB files were huge. Yours are in line with what’s expected / normal.

it a nuc with an m.2 ssd, i was going to upgrade the drive from a 1 tb to 4tb but i was hoping to avoid the cost and was hoping to offload the files I felt was least needed (not touching the DB but moving like metadata and thumbnails since a few years ago I was able to resolve this similar issue by just removing preview thumbnails).

I can always double check if there a second m.2 slot which probably there is. I just was hoping for a software fix vs having to change something hardware-wise.

Which NUC (make & model) do you have ?

What’s the capacity of the SSD? 500GB?

I have four Intel NUCs (NUC8-i7-HVK, NUC7-i3-BNK). All of them have two m.2 slots. I have three other mini-pc (4x4" bricks) with two M.2 slots as well.

Most are NVMe-capable. One of them is SATA-only m.2 which is still more than fast enough for PMS. (SATA M.2 is 525 MB/sec)

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