The painful experience of leaving Google Photos
Google Photos stopped providing unlimited storage June this year, and even though I am currently paying for Google Drive 100GB tier, I wanted to stop after I heard one too many reports of Google accounts being banned. This is my experience of leaving Google Photos.
Exporting the data
I had been using the service since 2015 and had 33 GB of photos on there. Overall it wasn’t a very good experience to stop using it.
The first thing I did was to create a takeout of 2GBs each. Downloading all of the 2GB zip files took some time. Since my Mac has limited space I had to store it on my external HDD. Then came the unzipping part. That also took some time since unzipping 2GB on a hdd is kinda slow.
I ended with with 16 folders of photos (33GB/2GB) exports. The way they had organised the photos in the export was that they created a new folder for each album you had and then a folder like “Photos from 2016” for photos from each year you’ve used the service. And since the export size was only 2GB, folders like “Photos from 2016” were distributed over multiple folders among that 16 unzipped folders. So I had to spend time organising such that all “Photos from 2016” folders are merged.. and so on and so forth for each album.
You’d think that’s it. But no. That’s where the real headache begins.
Problem 1 (Duplicates)
Once I started browsing the pics I saw multiple photos had duplicates. The photos had the same name but post fixed with (1). Like photo_229.jpg and photo_229(1).jpg. There were hundreds of these. So I wrote a python script to find these and eliminate these.
Problem 2 (Metadata)
This was a big problem. Due to whatever way they work, Google Photos strips your photos off all their Metadata and stores it separately. All information like created-time and latitude-longitude etc are not part of the photo anymore but exported as a JSON file along with the photo. So photo_229.jpg will have a photo_229.json file which will have all the real metadata while the photo has the created date of the time you created the takeout export. This metadata was very important for me if I wanted to sort these photos in my own way later on or use some other local photo organiser. This metadata on the photos will be invaluable. So now I had to write another python script to read the data from the JSON file for each photo and then edit the photo metadata with the correct data.
Problem 2.1 (Writing the script)
I started to write the script but realised this is going to a lot more complicated than I realised. I thought this is a big problem and surely others have solved it so I got looking. Fortunately that I found a pre built python script on Github (https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper) which did this very thing and so I tried it. Going through the script I realized that the JSON files have been stored in a lot more fucked up manner than I realized. Some were missing, some had wrong names, some had wrong extensions etc etc. Anyway, I run the script and it works well, but problem was that the script copied the photos which get done properly to a new place and don’t do anything to the original. I hated this system. This also spoilt the folder organization that was already present. What I wanted was that script should edit the photo where it was without creating a copy and if done successfully delete the JSON file.
EDIT (April 2023) — This project has come a long way and now supports albums and keeping the original folder organisation. Please do give it a try.
Problem 2.2 (Editing the script)
So I decided to edit the script for my own need. The script does a lot more than I had planned for myself. It looks for JSON files if not found, removed duplicates and also (this is something I hadn’t even anticipated) edits the metadata in the video files. I didn’t need most of these things. I only wanted to write the metadata back into the photos where they were without copying or moving them and finally delete the JSON file if done successfully. So I started stripping and editing the script to my needs.
This took a day or two to get it right but finally after some edits and some test runs it worked. So I fired it off on the main folder. I was afraid I might ruin my photos so what I did was I again downloaded my takeout (33GB) and safely kept it in case something went wrong. But fortunately it worked. I would have been happy even if it did a 90% accurate job, but it did a 99% accurate job. Out of about 20000 photos and videos, on later searching I only found about 100 JSON files meaning 100 JSON files which weren’t deleted and hence about 100 photos and videos whose metadata wasn’t corrected. I tried doing a name search using the JSON files but couldn’t find the matching photos either. I didn’t look further into it.
Problem 3 (Deleting photos from Google Drive)
This was another big problem. Google Photos does not provide any way to erase your data and deleting 20000 photos and videos manually would take days if not weeks. I started but it quickly turned very irritating and boring. I couldn’t do this repetitive task. I am a programmer. Surely I can automate this and get my sweet obedient computer to do it for me. I had done some python web scraping but automating tasks online was totally unknown. So I started searching again and Voilà I found exactly what I needed. A script to delete all your Google Photos online. Thank you open source contributors of the world!
https://github.com/mrishab/google-photos-delete-tool
It’s a genius tool I’d say. So I fired it off after reading the instructions. It stopped a few times but apart from that it worked immaculately. An hour or so later, all my photos gone! Done.
Problem 3.1 (Deleting shared albums)
Although the script does a beautiful job of deleting your own photos from the main view, your albums are left untouched. I had not too many albums so I went and deleted each of them manually. I could have edited the previous script to do this as well but I’d say this was the lazier approach which works well for an engineer (not by degree, but by spirit).
However, I quickly realised that Google Photo’s takeout never included photos of other’s in shared albums when I started seeing that some albums still had photos on it. So I simply downloaded the entire album from the option on Google Photos (which included the photos from others this time) and later unzipped and placed the photos in the folder of the respective albums.
For shared albums which belonged to me, I deleted the entire album itself and for albums which belonged to others, I removed myself. So done.
Problem 4 (Duplicates in Google Drive)
Even after I had deleted all photos from Google Photos and deleted all shared albums I was seeing old thumbnails on Google Photos in ‘things’ and ‘places’ and ‘people’ categories. I wasn’t sure why this was happening so I created another takeout. The takeout had nothing on it but I continued to see those thumbnails of old pics.
I remembered that I had a folder in Google Drive named Google Photos. I wasn’t quite sure why it had been there. It had been there since the start of Google Photos when I was using ‘Original’ quality instead of ‘High-Quality; uploads. But why was it on Google Drive. I assumed that all these pics in their original quality should have been downloaded as part of my Google-Photos takeout. But on opening this folder I see all these pics which I had already downloaded and sorted as mentioned in the previous steps. Another indicator of something being wrong was my drive-storage capacity. I had already cleaned out my Google Drive (as part of my effort to move away from it) so it should have only been showing 4GB (data from gmail) but it was showing 20GBs. So now I created a Google Drive takeout. Lo Behold I now had a 15GB folder of the same Google Photos again. Freaking duplicates again! And weirdly these photos had their metadata intact. And since I had “Original” setting on at that time, I wasn’t sure if these photos and videos were higher quality than the same ones downloaded using Google-Photos takeout.
For now I just kept the folder aside and plan to write another script to check which are exact duplicates and which are higher quality ones and remove the other one. However, thats a script for later. In the meanwhile I got back to the Google Photos folder on Google Drive. I didn’t trust Google Drive to delete all the photos if I simply deleted the folder, so I manually deleted all the items in the folder. Command + A then Delete was helpful but it still took 40–50 turns since it only selected 100–150 items at once. That was okay, still a lazier approach then spending a whole day to write a script which I’ll use only once. Did a new Google Drive takeout and Voila! This time it didn’t have any of the Google Photos. Finally done!
Problem 5 (More Duplicates)
Now this is not a major problem but still something I have to fix. As I had mentioned at the start, the way Google Photos exported photos was — a folder for each album you had created and also a folder called “Photos from 2016” for each year you had used Google Photos. On closer examination, I realised that most photos which existed in each of the album folder also existed in the “Photos from
Problem 6 (Failed Videos)
As a check to ensure that I had deleted all photos from Google Photos, I created a new takeout. It unfortunately still had a file. A single file in a folder called “Failed videos”. I’m not sure what it means but my best guess is videos which failed to upload properly? Not sure. But I still see this one video file in it. After searching on Google Photos online and on the app I couldn’t find this video anywhere. So its one file which is stuck in the middle — since I couldn't find it, I couldn’t delete it from Google Photos.
Conclusion
If you don’t wanna pay for storage for your photos post June 2021 I would suggest you create a takeout and start storing your photos elsewhere. What I ended up doing was to create a portable RAID drive in which I store all my photos. I hope you enjoyed reading this post. I would love to hear your experience of moving away from Google Photos or any questions you might have. Have a great week!
