This tool provides an efficient, stable, and automated way to delete multiple photos from Google Photos. It's now available as a Chrome extension for easier use, but you can also use the script injection method if you prefer.
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.
Our Google Photos Delete Tool significantly outperforms manual deletion and other available scripts. Here's how it stacks up:
Method | Photos Deleted per Minute |
---|---|
Manual Deletion | ~20 |
Average Script | ~100 |
Our Delete Tool | ~500* |
*Actual performance may vary depending on your internet connection and computer specifications.
- Batch Size: Deletes up to 500 photos in a single batch
- Scroll Speed: Processes approximately 1000 photos per scroll
- Error Handling: Automatically retries failed deletions, ensuring over 99% success rate
- 5x Faster: On average, our tool deletes photos 5 times faster than typical scripts and 25 times faster than manual deletion.
- Reduced API Calls: By using smart batching, we minimize the number of API calls, reducing the risk of rate limiting.
- Lower Resource Usage: Our selector-based approach uses less CPU and memory compared to timer-based scripts.
Deletion Speed (photos/minute)
|
500 | ___________ Our Delete Tool
| /
400 | /
| /
300 | /
|/
200 |/
| ___________ Average Script
100 | /
| /
0 |_/_____________ Manual Deletion
0 5 10 15 20 25 30
Time (minutes)
Our tool maintains high performance even with large libraries, whereas manual deletion becomes increasingly time-consuming.
- Prerequisites
- Optimizing Performance
- Method 1: Chrome Extension (Recommended)
- Method 2: Script Injection
- 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
To significantly speed up the deletion process for both the Chrome extension and script injection methods, we recommend blocking image loading:
-
🚫 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
- On Chrome:
-
Reload Google Photos after applying this setting.
This step can dramatically improve the tool's performance by reducing the amount of data that needs to be loaded.
-
Clone this repository or download it as a ZIP file:
git clone https://github.com/shtse8/google-photos-delete-tool.git
-
Open Google Chrome and navigate to
chrome://extensions/
-
Enable "Developer mode" by toggling the switch in the top right corner
-
Click on "Load unpacked" and select the
chrome-extension
folder from the cloned/downloaded repository -
The Google Photos Delete Tool extension should now appear in your Chrome extensions
-
Navigate to Google Photos
-
(Optional but recommended) Apply the image blocking step from the Optimizing Performance section
-
Click on the Google Photos Delete Tool extension icon in your Chrome toolbar
-
The tool will automatically start selecting and deleting photos based on the default settings
-
Monitor the progress through the browser console (press F12 to open Developer Tools, then select the Console tab)
-
The process will continue until it reaches the set limit or runs out of photos to delete
-
📸 Go to Google Photos
-
Apply the image blocking step from the Optimizing Performance section
-
🛠️ 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.
For the Chrome extension:
- Open the
chrome-extension/content.js
file - Locate the
CONFIG
object at the beginning of the file - Modify the
maxCount
value to your desired limit:const CONFIG = { maxCount: 5000, // Change this number to your desired limit // ... other config options };
- Save the file and reload the extension in
chrome://extensions/
For the script injection method:
- Open the
delete_photos.js
file - Locate the
CONFIG
object at the beginning of the file - Modify the
maxCount
value as shown above - Save the file and use the updated script for injection
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.
- If using the extension, try the script injection method to see if the issue persists.
- If problems persist, please open an issue on this GitHub repository.
- 🛑 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.
📌 If you find this tool helpful, please consider giving it a star on GitHub! ⭐