Skip to content

Instantly share code, notes, and snippets.

@JourneyOver
Created November 22, 2025 07:55
Show Gist options
  • Select an option

  • Save JourneyOver/d26f7c5c2d752f0bf52d72ac20f6ddc7 to your computer and use it in GitHub Desktop.

Select an option

Save JourneyOver/d26f7c5c2d752f0bf52d72ac20f6ddc7 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import argparse
from plexapi.myplex import MyPlexAccount
# Configuration section
DEFAULT_PLEX_TOKEN = "PLEX_TOKEN" # Replace with your Plex token
def main():
parser = argparse.ArgumentParser(description="Clear Plex Watchlist")
parser.add_argument(
"--token", default=DEFAULT_PLEX_TOKEN, help="Plex authentication token"
)
parser.add_argument(
"--dry-run",
action="store_true",
help="Show what would be removed without actually removing",
)
args = parser.parse_args()
try:
account = MyPlexAccount(token=args.token)
watchlist = account.watchlist()
if not watchlist:
print("Watchlist is already empty.")
return
if args.dry_run:
print("Dry run mode - would remove the following items:")
for item in watchlist:
print(f" - {item.title}")
else:
print("Removing items from watchlist:")
for item in watchlist:
item.removeFromWatchlist()
print(f" - Removed: {item.title}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment