ShowSweep is a Python utility to identify and manage unwatched TV shows in Plex, with integration for Overseerr, Tautulli, and Sonarr. It helps you keep your TV library clean by safely removing or archiving shows that are no longer needed.
git clone https://github.com/faultoverload/showsweep.git
cd showsweep- Create a virtual environment (recommended):
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt - Or use Docker (see Docker section below)
- Copy
config/example_config.initoconfig/config.iniand edit it with your server URLs, API keys, and preferences.
python main.py [options]- By default, ShowSweep runs in simulation mode (no files are deleted).
- Use
--skip-confirmationand--actionto automate actions. - All options can be set in
config.inior overridden on the command line.
- Interactive mode:
python main.py
- Non-interactive, delete all eligible shows:
python main.py --skip-confirmation --action delete
- Force refresh all data:
python main.py --force-refresh
- Enable debug logging:
python main.py --debug
-
Create the configuration file:
cp config/example_config.ini config/config.ini
-
Edit the configuration file:
nano config/config.ini
-
Run with Docker Compose:
docker-compose up -d
-
View logs:
docker-compose logs -f
-
Run with custom arguments:
docker-compose run --rm showsweep python main.py --debug --force-refresh
You can run ShowSweep directly from Docker Hub without building locally:
docker run --rm -v $(pwd)/config:/config -v $(pwd)/logs:/logs \
-e TZ=America/New_York \
faultoverload/showsweep:latestYou can also pass command line arguments:
docker run --rm -v $(pwd)/config:/config -v $(pwd)/logs:/logs \
-e TZ=America/New_York \
faultoverload/showsweep:latest --skip-confirmation --action deleteYou can modify the docker-compose.yml file to:
- Set environment variables instead of using config.ini
- Change the timezone
- Connect to an existing Docker network where your media services run
- Configure scheduling with cron (by using the Docker host's cron)
docker build -t showsweep .
docker run -v $(pwd)/config:/config showsweep- Identify and manage unwatched TV shows in Plex
- Clean up Plex library by identifying TV content that has been downloaded but never watched
- Plex: Retrieve and manage TV show libraries
- Overseerr: Check if shows were requested before deletion
- Tautulli: Retrieve watch statistics
- Sonarr: Unmonitor or delete series as needed
- Show discovery from Plex
- Identify unwatched shows (no watch or request history)
- Correlate show data across Plex, TVDB, TMDB
- Actions:
- Delete: Remove unwatched shows from Plex
- Keep first season: Delete all but the first season
- Keep first episode: Delete all but the first episode
- Keep: No action
- Rich text console interface
- Interactive mode: Prompt for each show
- Non-interactive mode: Apply default action
- Local SQLite database for caching and tracking
- Store TV show list, watch stats, request data, and ID mappings
- Record processing history and actions
- Configurable cache TTL (default 24h)
- Automatic cache refresh
- Force refresh option
- All options in
config.ini - Command line overrides
- Environment variable support
- Docker-friendly config
- Simulation mode (no files deleted by default)
- Explicit deletion with
--action delete - Processing summaries and logs
- Tracks actions and timestamps
- Configurable per-service rate limits
- Error handling for API/database failures
- Safe DB transaction management
- Database repair, backup, and restore
- Configurable logging (console and file)
- Docker containerization
-
--skip-confirmation: Non-interactive mode -
--debug: Debug logging -
--force-refresh: Bypass cache -
--action: Default action for eligible shows -
--skip-overseerr,--skip-tautulli: Skip checks -
--ignore-first-season,--ignore-first-episode: Ignore certain shows
- Do not delete shows with recent Overseerr requests
- Do not delete shows with any watch history
- Confirmation required in interactive mode
- See
config/example_config.inifor all available options and documentation. - Place your config as
config/config.inior set theSHOWSWEEP_CONFIGenvironment variable.
Pull requests and issues are welcome!
MIT