A powerful and configurable JavaScript-based tool to efficiently clean up your YouTube Watch Later playlist. This script automates the process of removing videos from your Watch Later playlist, handling thousands of videos with reliable execution and smart pacing to avoid rate limiting.
- Batch Processing: Intelligently processes videos in configurable batches
- Smart Pacing: Automatic breaks between batches to avoid rate limiting
- Error Recovery: Automatic retries for failed deletions
- Progress Tracking: Real-time console logging of deletion progress
- Configurable Settings: Easily adjustable parameters for different needs
- Debug Mode: Detailed logging for troubleshooting
-
Open Your Watch Later Playlist
- Go to YouTube
- Navigate to your Watch Later playlist
- Make sure you're logged into your account
-
Open Developer Tools
- Press
F12
or right-click and select "Inspect" - Go to the "Console" tab
- Press
-
Run the Script
- Copy the entire script content
- Paste it into the console
- Press Enter to start the cleanup process
The script comes with configurable options at the top:
const config = {
batchSize: 50, // Number of videos per batch
deletionDelay: 800, // Milliseconds between deletions
batchBreakTime: 1000 * 60 * 2, // Break time between batches (2 min)
maxRetries: 3, // Retry attempts for failed deletions
debugMode: true, // Enable detailed logging
};
Option | Description | Default | Recommended Range |
---|---|---|---|
batchSize |
Number of videos to process before taking a break | 50 | 20-100 |
deletionDelay |
Delay between each video deletion (ms) | 800 | 500-1000 |
batchBreakTime |
Break duration between batches (ms) | 120000 | 60000-300000 |
maxRetries |
Maximum retry attempts for failed deletions | 3 | 2-5 |
debugMode |
Enable detailed console logging | true | true/false |
The script provides detailed console output with color-coding:
- π΅ Blue: Information messages
- π’ Green: Success messages
- π΄ Red: Error messages
Example output:
Starting Watch Later cleanup...
Batch size: 50, Delay: 800ms
Video removed successfully
Batch 1 complete. Deleted so far: 50
Taking a 120s break...
-
Rate Limiting:
- YouTube may have rate limits for automated actions
- The script includes breaks to avoid triggering these limits
- Adjust timing parameters if you encounter issues
-
Browser Focus:
- Keep the YouTube tab active while the script runs
- Avoid switching to other tabs/windows
- Don't minimize the browser
-
Playlist Size:
- Works with playlists of any size
- Larger playlists will take longer to process
- Progress is logged in real-time
-
Error Handling:
- Failed deletions are automatically retried
- Errors are logged to the console
- Script continues running even if some deletions fail
If you encounter issues:
-
Script Stops Working
- Refresh the page
- Wait a few minutes
- Try running again with increased delays
-
High Failure Rate
- Increase
deletionDelay
- Decrease
batchSize
- Ensure stable internet connection
- Increase
-
YouTube UI Changes
- The script may need updates if YouTube changes their interface
- Check for updated versions of the script
For slower connections:
const config = {
batchSize: 30,
deletionDelay: 1000,
batchBreakTime: 1000 * 60 * 3,
maxRetries: 4,
debugMode: true,
};
For faster connections:
const config = {
batchSize: 75,
deletionDelay: 600,
batchBreakTime: 1000 * 60,
maxRetries: 2,
debugMode: true,
};
Feel free to submit issues and enhancement requests!
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by various YouTube playlist management scripts
- Enhanced with robust error handling and smart pacing
- Developed to help users manage large Watch Later playlists efficiently
Note: This script is provided as-is, without any guarantees. Use at your own risk and responsibility. Always ensure you have backups of important playlists before running automation scripts.