https://github.com/hyperlink/plex-tv-cleanup
Automatically delete watched TV shows on Plex
https://github.com/hyperlink/plex-tv-cleanup
nodejs plex plex-media-server plex-tv tv
Last synced: about 1 year ago
JSON representation
Automatically delete watched TV shows on Plex
- Host: GitHub
- URL: https://github.com/hyperlink/plex-tv-cleanup
- Owner: hyperlink
- License: mit
- Created: 2016-04-26T02:54:18.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2021-03-13T17:25:19.000Z (over 5 years ago)
- Last Synced: 2025-03-25T01:51:10.375Z (about 1 year ago)
- Topics: nodejs, plex, plex-media-server, plex-tv, tv
- Language: JavaScript
- Homepage:
- Size: 67.4 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Plex TV Show Cleanup
NodeJs script to delete watched TV episodes from Plex. You can configure a whitelist to prevent deletion.
* Automatically finds the TV Section in Plex
* Gives a breakdown how much space each episode takes up
* Deletes watched TV episodes
* Performs a refresh of the TV section
* Shows how much space was recovered
[](https://github.com/feross/standard)
## Installation
### Step 1
Install NodeJs and plex tv cleanup on your Plex server.
```
npm i -g plex-tv-cleanup
```
### Step 2
Create a new JSON file in `~/.plex-tv-cleanup-config.json` and fill it with your information like below:
Example:
```json
{
"plex": {
"hostname": "127.0.0.1",
"username": "",
"password": "",
"serverName": "Mac Mini",
"managedUser": {
"name": "Family",
"pin": "1234"
}
},
"dnd": [
"/Volumes/SavedTVShows",
"iZombie",
"The Expanse",
"Into the Badlands"
]
}
```
* `plex.hostname` is **required**
* `plex.serverName` is required if using managedUser and having multiple plex servers
* `plex.username`, `plex.password` and `plex.managedUser` are required if you have [Plex Home](https://support.plex.tv/hc/en-us/sections/200641063) enabled
* `dnd` is optional *Do Not Delete* whitelist of dir path or file names
## Usage
Run `./plex-tv-cleanup` to execute it.
Dry run to see what it would delete run `./plex-tv-cleanup --dry-run`
## License
### MIT