Skip to content

Environment Variables

ChuckPa edited this page Oct 16, 2026 · 1 revision

Environment variables customize some operations. A command line option, where one exists, overrides its variable (see Command line options).

WARNING: Use of these variables may adversely impact Plex Media Server operation or performance. USE WITH CAUTION.

DBREPAIR_CACHEAGE - Maximum age for PhotoTranscoder cache images

Days of cache images to retain. Range 1-999. Default 30. Option: --cacheage

Used by Prune (21). Prune does not ask for confirmation. It removes the files and reports the number removed when done.

Example: export DBREPAIR_CACHEAGE=20

Enter command # -or- command name (4 char min) : remove

Pruning started...
Pruning completed (4497 files removed).

DBREPAIR_EXPUNGEAGE - Age limit for expunging account view history

Days used by Expunge (22). Range 1-3000. Default 180. Option: --expungeage (alias --expunge)

Example: export DBREPAIR_EXPUNGEAGE=365

DBREPAIR_DOWNLOADDIR - Directory for update downloads

The directory must already exist and be writable, otherwise an error is shown and it is ignored. If not set or not writable, the defaults listed under --downloaddir apply (see Command line options). Option: --downloaddir

Used by Update (88).

Example: export DBREPAIR_DOWNLOADDIR=/tmp

DBREPAIR_PAGESIZE - Sets the SQLite 'page_size'

For ZFS users whose datasets have custom record sizes. Normal Linux filesystems (ext4, xfs) do not need it.

If set, applies to both the main and blobs databases DBRepair creates. If not set, the SQLite default of 4096 is used. It suits most systems. The value is shown by Config (90).

Example: export DBREPAIR_PAGESIZE=16384

Constraints

Must be a power of 2 from 512 to 65536. Default is 4096. Any other value shows an error and the default is used.

Management

If you attempt to optimize your database but find the resultant performance is not to your liking, you may try another value and run Automatic again.

If you ultimately decide to run with the default value (4096):

  1. Remove the environment variable.
  2. Run DBRepair again using Automatic. Your databases will revert to the host OS's default.

Back | Next

Clone this wiki locally