Repository navigation
Menu: Expunge
- EXPUnge - (Option 22): Remove View History of Non-existent or Expired Accounts
-
Overview: Removes view history and statistics left behind by accounts which no longer exist in Plex, or which have been inactive longer than an age threshold. The threshold defaults to 180 days and can be changed with
--expungeage N(or theDBREPAIR_EXPUNGEAGEenvironment variable), up to a maximum of 3000 days (see Command line options). Before anything is removed, Expunge prints a report listing each account (name or account ID), its last-active date, and the days inactive. When complete, it prints the total number of accounts removed. -
Availability: Runs only when Plex Media Server is stopped. Requires enough free disk space for the working copies. Runs a check first and refuses if either database is damaged (run
Repairfirst), unless the--forceoption is given. -
Technical quirks & behavior: The account owner (account ID 1) is never removed. Interactively, Expunge shows the report and asks
Ok to delete these users (y/N)before deleting. When run from the command line (batch mode), it deletes without asking. Up to 100 accounts are considered in one run. If no account qualifies, Expunge says so and changes nothing. -
Safety status: Caution — Removed history cannot be recovered except with
Revert. Works on copies of the databases; the result is promoted to active only after both databases pass an integrity check, is recorded inHistory, and can be undone withRevert.
-
Documentation for DBRepair v26.10.00
DBRepair is proprietary software. Copyright: @ChuckPA 2022-2026 All Rights Reserved.
Use at own risk! This tool is not associated with Plex Inc.