4 min read
  • Updated on 8 Dec 2019:
    • updated selector

In this article I will show you how to automatically remove all of your photos and reviews from your Google Maps account at once and without installing any plugin.

Google Maps Contributions

Whatever the reason could be, in this way you will have the cleanest News feed timeline possible.

Free your mind from the clutter. Offline life is better.

Disclaimers

Disclaimer: It is needed a simple and short script which you should want to understand before running it, because it has the power to mess up with your Google account.

Disclaimer: Follow the steps at your own risk. I am not responsible for what your are doing. Are you?

Getting Started

There are three simple steps in between you and the clarity of your Google Maps account. There is a short script involved, which you will copy and paste into the console of the Developer tools of your browser (Firefox, Chrome) while navigating into the Photos and Reviews section of Your contributions on Google Maps.

In Short, what you will be doing:

  1. Get the script.
  2. Go to the Photos and Reviews section of Your contributions on Google Maps.
    • Scroll down entirely until all of your photos (or reviews) are visible in the thumbnail.
  3. Run the script within the browser.

1. Get the script

Copy in your clipboard the code of the most recent version of the script from github, or try your luck with this one:

// Google Maps - Delete All Contributions
// 1. Go to Google Maps, on your desktop
// 2. Open the left tab menu
// 3. Click on "Your contributions"
// 4. Select the tab "Photos" or "Reviews"
// 5. Scroll down until all or most of all pictures (or reviews) are shown in list
// 6. Open the Developer tools (F12, on Firefox or Chrome)
// 7. Open the Console tab
// 8. Copy Paste this script
// 9. Type pleaseDeleteContributionsPlease(), wait for it to be done.
  
var pleaseDeleteContributionsPlease = function () {

    var confirmDeleteContribution = function() {
        [...document.querySelectorAll('button[class~="blue-button-text"]')].forEach( (a) => { 
            a.style.border = "thick solid red";
            a.click(); 
        });
        setTimeout(removeMe, 5000);
    }
        
    var deleteContribution = function() {
        [...document.querySelectorAll('div[role="menuitem"][class="action-menu-entry"] > div[class="action-menu-entry-text"]')].forEach( (a) => { 
            if (a.innerHTML.includes("Delete")
                || a.innerHTML.includes("Elimina")) {
                a.parentElement.style.border = "thick solid red";
                a.parentElement.click(); 
            }
        });
        setTimeout(confirmDeleteContribution, 600);
    }

    var removeMe = function() {
        
        var elem = items[currentIndex];
        if (currentIndex < numberOfItems && elem) {
            
            elem.style.border = "thick solid red"; 
            elem.click();

            // goes to the next item
            currentIndex = currentIndex + 1;
            console.log('task:', currentIndex, 'of', numberOfItems);
            // set to delete the item
            setTimeout(deleteContribution, 600);
        
        } else {
            clearTimeout();
            console.log('DONE. You did a favor to your past and present self. Now, go print one of your favorite pictures and hang it on a wall, please.');
        }  
    };

    // these are used inside the above functions
    var currentIndex = 0; 
    var items = [...document.querySelectorAll('button[class*="action-menu"]')];
    var numberOfItems = [...document.querySelectorAll('button[class*="action-menu"]')].length;
    // start iterating through `items`
    removeMe();
}

2. Go to the Photos and Reviews section of Your contributions

  1. Go to Your contributions on Google Maps.
  2. Select the Photos or Reviews tab.

    Google Maps Photos section of Your contributions

  3. Scroll down entirely until all of your photos (or reviews) are visible in the thumbnail.

3. Run the script within the browser

  1. Press F12 to open the Developer tools window (Firefox, Chrome).
  2. Select Console.
  3. Paste the script into the prompt of the console
  4. Type pleaseDeleteContributionsPlease(), hit return, and wait until it’s done.
  5. Eventually run again the script for those photos or reviews that were not deleted.
  6. Run the script for both the Photos or Reviews tabs.

Tip

You might want to choose to not list all your reviews, photos, and other public posts on your public profile.

  1. Go to Your contributions on Google Maps.
  2. Select the Contribute tab.
  3. Click on Profile settings.
  4. Make your choice.

    Google Maps No Activity Recorded, Yet

Bonus

Google is a company which makes profit on your data. It is OK, for them. They track also the usage of all your apps if you use an Android system, all of the YouTube videos you watched and how often, and of course all the websites you visite, and the searches you typed in the google page (if you are logged in, of course).

They track the audio and the resulting text everytime you used the Ok Google… thing.

If you care about what you share with them and the rest of the world, please review your settings here, per each section you can Pause it, and I would suggest to visit each of the Manage activity and have a look at what you could delete in the history or not. Location History at the moment has no easy way to delete all of its recorded entries other then a script that you will find on this blog. Funny.

Google Maps No Activity Recorded, Yet



If this article was useful to you, please share it using your favorite way for doing it! If you have suggestions of improvement or you’ve found something wrong, please let me know!


You are not being tracked on this website, no analytics, no cookies taken. I am still looking for a good plugin for comments which respects people's privacy. This website is hosted by Gitlab Pages which as far as stated by their general GitLab's privacy policy terms they collects potentially personally-identifying information like Internet Protocol (IP) addresses as mentioned in this thread.