google-photos-delete-tool icon indicating copy to clipboard operation
google-photos-delete-tool copied to clipboard

Added album deletion script

Open jsncrdnl opened this issue 5 years ago • 12 comments

Thanks for your script, it was helpfull. I just modified it to make album deletion possible.

jsncrdnl avatar Feb 27 '19 11:02 jsncrdnl

Thanks a lot, this worked great for me, except I had to double the delete cycle time (on a pretty fast machine and ISP, so I imagine most people would need it longer too)

danepowell avatar Apr 08 '19 20:04 danepowell

You're welcome !

jsncrdnl avatar Apr 09 '19 06:04 jsncrdnl

Hi, thanks for the script, it is really helpful as I have about 120.000 photos uploaded to Google and I want to delete them all. My question to you, is it possible to modify the script so that I can increase the selection of photos per each step? Right now the script selects about 15-30 images at once and it would take quite some time for all of them to be deleted. Thanks!

nevrozel avatar Jun 16 '19 07:06 nevrozel

Hi @nevrozel, the script doesn't limit the amount of images it selects by default. It attempts to select all the images that are loaded in the DOM at the given moment.

It is possible to increase the amount of images selected by having an automatic scroll but that could

  1. Cause the script to fail on certain devices.
  2. Increase the complexity of the logic.

If there is a greater demand for the feature, it could certainly be introduced.

mrishab avatar Nov 14 '19 08:11 mrishab

Hello, I have 10000 albums generated by the API by mistake. Any chance to use this to delete them? Please help on how to use, thank you!

maltokyo avatar Jul 15 '20 10:07 maltokyo

Hello, I have 50,000 albums mistakenly created by rclone sync. This code is really really helpful. I'm deleting my stupid albums in safari browser of both my macbook and iPhone. Of course it's not possible to use both at the same time. For your reference, simply, I could create ios shortcut(Run javascript...) with this code and I can remove them even while I'm driving.

ohnggni avatar Jul 29 '20 11:07 ohnggni

Right now the script selects about 15-30 images at once and it would take quite some time for all of them to be deleted. Thanks!

I didn't modify the code though but with this wizard, I was able to select over 400 images at once: by zooming out 25% (the minimum zooming rate on Chrome or you can force zoom rate in the console by

document.body.style.zoom = 0.1

This may give Google Photos enough time to preload the remaining albums. Otherwise, you might experience log like No more albums to delete. Tool exited. and you wait a bit and refresh the site, you then again have the "new" albums.

image image

sarkrui avatar Aug 20 '20 15:08 sarkrui

Hello, I have 50,000 albums mistakenly created by rclone sync.

Same. Do you know why the Rclone sync made that many albums by any chance? I experienced the same issue and I had no idea what mistakes I made in particular though.

sarkrui avatar Aug 20 '20 16:08 sarkrui

@jsncrdnl Could you make the changes requested?

mrishab avatar Oct 29 '20 07:10 mrishab

Everyone, please see the updated documentation: https://github.com/mrishab/google-photos-delete-tool/pull/18/files

This change can help speed up the image loading.

mrishab avatar Oct 29 '20 07:10 mrishab

Hi, I thanks for sharing a great piece of code. I have used the delete tool successfully on Chrome approx. 9 months ago but when I tried to use it today I have a problem. Using Chrome Version 87.0.4280.141 when the procedure comes to pressing confirmation delete button the photos are not deleted and then the procedure loops forever as nothing has been deleted. Any ideas?

Regards Sam Clarke

sameclarke avatar Jan 08 '21 16:01 sameclarke

Right now the script selects about 15-30 images at once and it would take quite some time for all of them to be deleted. Thanks!

I didn't modify the code though but with this wizard, I was able to select over 400 images at once: by zooming out 25% (the minimum zooming rate on Chrome or you can force zoom rate in the console by

document.body.style.zoom = 0.1

This may give Google Photos enough time to preload the remaining albums. Otherwise, you might experience log like No more albums to delete. Tool exited. and you wait a bit and refresh the site, you then again have the "new" albums.

image image

That's a great suggestion!!

@sarkrui , can you make a PR with this change so that it automatically does it before deleting?

mrishab avatar Aug 10 '21 22:08 mrishab

Closed. As the solution is to decrease the zoom on the brower.

mrishab avatar Dec 20 '22 02:12 mrishab