A pair of Python scripts to clean up and remove labels from your Plex libraries.
- Supports Movies and TV Shows libraries
- Supports removing labels from individual items and collections
- Dry-run mode to preview changes before applying
- Optional logging to a file
- Simple to configure and use
Basic version – quick and effective for cleaning all labels
- Removes all labels from every item and collection
- Logs what labels were removed
- Best for blanket removal of all metadata tags
Enhanced version – smarter, safer, and more informative
- Removes labels from items and collections
- Auto-detects or uses a preset list of leftover labels
- Scans for any labels still present afterward
- Adds post-run guidance:
- Check managed user restrictions
- Optimize Plex database
- Best for thorough cleanup and audit
Enhanced version – smarter, safer, and more informative
- Removes labels from all individual episodes
- Auto-detects or uses a preset list of leftover labels
- Scans for any labels still present afterward
- Adds post-run guidance:
- Check managed user restrictions
- Optimize Plex database
- Best for thorough cleanup and audit This is supplied by the help of @mrjohnpoz and their research
- Python 3.x
plexapi
pip install plexapi- Visit: https://app.plex.tv
- Open Dev Tools → Network tab
- Filter by
X-Plex-Token - Copy the token from one of the requests
- Visit: https://app.plex.tv
- Click into a Movie or Episode → 3-dot menu → Get Info → View XML
- Token is in the URL (e.g.
&X-Plex-Token=XYZ)
Open either script and update these variables:
PLEX_URL = 'http://localhost:32400' # Plex server address
PLEX_TOKEN = 'YOUR_PLEX_TOKEN_HERE' # Your Plex token
DRY_RUN = True # True = preview only
ENABLE_LOG = True # True = enable loggingLEFTOVER_LABELS = [] # Leave empty to auto-detect or define manuallyRun either script:
python remove_plex_labels.py
# or
python remove_plex_labels_v2.pyStart with DRY_RUN = True to simulate changes.
Switch to False once you’re confident it’s safe.
If ENABLE_LOG = True, all actions are recorded in:
label_removal.logAlways test with DRY_RUN = True first.
Review logs carefully.
Consider backing up your Plex database before running full removal.