Clear "cache" folder, once or twice a month, is it safe?

Server Version#:1.27.2.5929

Player Version#:
Hi Guys,

sorry to bother you all, a quick question,

i usually run this script for backup alekdavis/PlexBackup: PowerShell script to back up and restore Plex application data on a Windows system. (github.com) , before update every public release of PMS

recently, i started to wipe cache folder before update

step done:

stop plex,wipe cache folder,restart plex and then run backup script(because it need plex in running state, the script will kill plex by itself as it’s 1st step)

Now you have the complete detail of situation, is it safe to delete cache folder often? do i risk to lose something?

after i delete cache and restart plex, only thing i notice is: 1st time i search something, the poster(cover art) take a second to show…but it usually fix automatically after 1 or 2 days. again, everything normal? can i continue to wipe cache folder? the main reason is to speed up backup process.

i don’t use customized poster/arts or something like that
in the end, what exactly “cache” folder do, and is it important?(why?)

Thanks for any reply :slight_smile:

1 Like

Perfectly safe … I’ve been deleting this weekly via a cronjob for well over a year now (maybe over 2 years) …

sudo rm -rf /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Caches/*
sudo rm -rf /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Data/*
sudo rm -rf /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Metadata\ Combination/*
sudo rm -rf /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Cache/PhotoTranscoder/*

The Cache/PhotoTranscoder is the worst! It can grow unbounded if not controlled and managed outside of plex. See Cache/PhotoTranscoder Folder Size Sanity Check for details.

Simply tell the backup script to not copy the cache folder.
Directive "ExcludeDirs"

A cache in computers is a storage space for items which need to be accessed fast. The items are originally either stored on slower storage, or in Plex’s case are stored in a larger resolution. So to avoid the server to have scale down dozens or even hundreds of pictures when browsing the library, the downscaled versions of cover art and posters are put into the cache folder.

TL;DR: it is a method to trade storage space for computing time.

1 Like

Thanks @OttoKerner in the end i’ll not cause any issue wiping cache folder right?
is it the same if i had customized posters/cover arts?

I haven’t tried that myself. There might be issues if you use to use the “upload” method in the plex app. (Instead of putting the posters beside the media files)

1 Like

maybe i’ll try on a show or 2 and then wipe the cache folder to see what happen.
Again. thanks you so much for the fast reply Otto

FWIW, according to the guy who makes that PowerShell backup script, if you exclude or delete the cache folder you could possibly lose all your custom posters and artwork:

I’m pretty sure the Cache folder is needed unless you want to redo all poster art, etc.

I’ve never tested this, just mentioning it in case that’s a concern.

1 Like

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