This tool provides an efficient, stable, and automated way to delete multiple photos from Google Photos. Unlike other scripts or manual methods, this tool offers several unique features:
- 🎯 Selector-based Awaiting: Instead of using timers, this script uses selectors to await elements, ensuring optimal performance and stability across different network speeds and device capabilities.
- 🔄 Automatic Scrolling: The script automatically scrolls through your entire photo library, eliminating the need for manual intervention.
- 📦 Batch Processing: Photos are selected and deleted in batches, significantly speeding up the deletion process.
- 🔢 Customizable Deletion Limit: Users can easily set a maximum number of photos to delete, providing fine-grained control over the operation.
- 💪 Resilient to Interruptions: If the script stops unexpectedly, it can be restarted and will continue from where it left off.
This improved version offers a more reliable and efficient solution for users looking to manage large numbers of photos in their Google Photos account.
- Prerequisites
- Usage
- Customization
- Troubleshooting
- Caution
- Frequently Asked Questions
- Contributing
- License
- 🌐 A modern web browser (tested on Google Chrome, but should work on others)
- 🔑 Access to the English version of Google Photos
-
📸 Go to Google Photos
-
🚫 Disable image loading for Google Photos on your browser to avoid high CPU, RAM, and network usage:
- On Chrome:
- Click on the site padlock (the lock icon along the URL bar) -> Site settings
- Block images in the Permissions for the website
- Reload Google Photos
- On Chrome:
-
🛠️ Open Developer Tools. You can do this by:
- Keyboard Shortcut: Press
CTRL + SHIFT + I
- From the Page: Right-click on an empty area and select
Inspect
(last option)
- Keyboard Shortcut: Press
-
💻 After opening the developer tools, click on the
Console
tab. -
📋 Copy all the code from the
delete_photos.js
file and paste it into the console. -
▶️ Hit ENTER after pasting the script in the console. The script will start running upon hitting the ENTER key. -
🚀 The script will start selecting and deleting photos automatically. You'll see progress updates in the console.
You can adjust the maxCount
variable at the beginning of the script to set the maximum number of photos to delete. By default, it's set to 10,000.
const maxCount = 10000; // Change this number to your desired limit
If you encounter any issues:
- 🌐 Ensure you're using the English version of Google Photos.
- 🔄 Try refreshing the page and running the script again.
- 🔁 If the script stops unexpectedly, you can simply run it again to continue the process.
- 🔍 Check the browser console for any error messages and report them if the issue persists.
- 🛑 Use this script responsibly. Deleted photos may be recoverable for a limited time, but exercise caution to avoid unintended data loss.
- 🔄 This script interacts with the Google Photos interface, which may change over time. If Google updates their UI, the script may need adjustments.
- 💾 Always ensure you have backups of important photos before performing bulk deletions.
-
Q: Is this tool safe to use? A: While the tool is designed to be safe, always use caution when bulk deleting files. Ensure you have backups of important photos.
-
Q: Can I recover photos deleted by this tool? A: Google Photos typically keeps deleted items in the trash for 60 days. You can recover them from there within this period.
-
Q: Why does the script sometimes pause or slow down? A: The script may slow down due to network latency or Google Photos' rate limiting. It's designed to handle these situations gracefully.
Contributions are welcome! If you have suggestions for improvements or encounter any problems, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer: This tool is not officially associated with Google. Use it at your own risk. The developers are not responsible for any data loss or account issues resulting from the use of this script.