How to Delete Multiple Instagram Posts in Bulk Automatically?

Learn how to mass delete Instagram posts automatically without any app, software, or extensions. A simple script to automate the bulk deletion of posts.

If you’re revamping your business, then it’s a good idea to remove all the existing posts and start from scratch. However, Instagram does not support mass delete options. You need to delete the photos one after the other manually only from the mobile app.

Currently, the Instagram mass delete or clean up solutions available are very limited and unsecured. The Instagram mass cleanup third-party apps require you to share your login username and password. These apps are not even listed on Google PlayStore or Apple App Store, hence you can imagine the risk of your account.

I recently published an article and video demo on how to delete the Instagram photos on the computer. Though this option is not available, however using the tip I mentioned you will be able to delete the post from a computer browser.

Based on the same tip, I developed an InstaG Purger script that automatically deletes Instagram photos fast from your account one after the other. This script is safe and does not need your credentials, unlike other solutions.

How to Bulk Remove Instagram Photos?

As I mentioned, the mass delete or bulk removal of Instagram photos is really simple using the script. It only works on the computer and not on mobile phones.

Here are the steps to mass delete Instagram posts at once:

Step 1: Login your Instagram account in the Chrome browser on the computer.

Step 2: Switch to the Profile home page. ex:

Step 3: Right-click for more options and select Inspect.

Chrome Browser Inspect Element option

Step 4: Click on the Toggle device toolbar.

Device toolbar Chrome

Step 5Reload the Instagram profile page.

Step 6: Click on the Feed icon to make a switch.

Instagram Feeds icon

Step 7: Switch to the Console tab in the Developer console.

Step 8: Copy and paste the below InstaG Purger script in the Console.

Instagram Purger Script in Developer Console

Step 9: Hit on the Enter button on the keyboard to execute the script and auto-delete the Instagram photos.

Instagram posts delete on computer browser

The script will be executed and the console log will display the number of posts deleted. You can customize the script to set as many as the post you want to delete.

Number of Instagram Photos using script

There are chances that the script might fail after a few days or months due to changes in Instagram UI. However, please let me know if it does, I will be happy to update and fix the script as soon as possible.

The InstaG Purger script can mass delete all Instagram posts at once without any software, apps, or any extensions.

InstaG Purger Script

Here is the script that you need to run in the Chrome browser developer console:

// Name: InstaG Purger
// Author: KushalAzza
// Details:

var i = 0;                                                                                              //  set your counter to 0
function instagramDeleter() {                                                                           //  create a deleter loop function
   setTimeout(function () {                                                                             //  call a 3s setTimeout when the loop is called
        document.querySelector('div.Igw0E.rBNOH.YBx95._4EzTm').click();  //  selector to click on options menu
        setTimeout(function () { document.querySelector('button.aOOlW.-Cab_').click(); }, 2000)         //  selector to click delete option
        setTimeout(function () { document.querySelector('button.aOOlW.-Cab_').click(); }, 4000)         //  selector to click delete confirmation
        console.log (i+1 +" Deleted")                                                                   //  delete numbering to console
        i++;                                                                                            //  increment the counter
        if (i < 5) {                                                                                    //  if the counter < 5, call the loop function
            instagramDeleter();                                                                         //  ..  again which will trigger another 
        }                                                                                               //  ..  setTimeout()
    }, 6000)

Modify the highlighted value in green to set the number of Instagram posts to be deleted in one go.

Limitation for InstaG Purger

Though the InstaG Purger script eases your job of bulk or mass deleting the Instagram account. There are some limitations while the script is running. Most importantly, you should leave the tab open and let the script do its work in the background.

  • The script may fail if Instagram revamps the website UI.
  • You may not be able to use Instagram in the same tab while the script is running.
  • The script removes post sequentially from the latest to the oldest order, you may not be able to change the sequence.
  • You will need a fast data connection for Instagram feeds to load quickly.
  • If you refresh or reload the page, the script will stop and you may need to re-execute the script again.
  • The delete post count won’t be refreshed in real-time.

If you’re facing any issue apart from the mentioned, please drop in below comment box.

Video on Mass Delete Instagram Photos

Here is the video demo on mass deleting the Instagram photos from the desktop browsers using InstaG Purger script.

How to Mass Delete Multiple Instagram Posts in Bulk?

I hope you liked the video, please subscribe to our channel on YouTube.

If you've any thoughts on How to Delete Multiple Instagram Posts in Bulk Automatically?, then feel free to drop in below comment box. Also, please subscribe to our restoreBin YouTube channel for amazing videos tips. Cheers!

Kushal Azza
I've keen interest in exploring the latest tech and gadgets. A digital development and analytics consultant. Also, a geek behind this website/blog!

50 Responses

  1. Danie Alatorre says:

    Hi ! I am trying to follow your guide for the mass/bulk delete posts on IG but i get an error

    Uncaught TypeError: Cannot read property ‘click’ of null
    at :4:94

    Can you please help me with this ?


    • Kushal Azza says:

      Hi Daniel, looks like the IG has revamped the website elements. However, I’ve updated the script and tested live. It working now!

      Thank you for the alert.

      Kushal Azza

  2. Xander says:

    Hi awesome tool! It kind of executes the command, however I get a 400 (bad request) error. Please advise 🙂

    Much appreciated!

    • Kushal Azza says:

      Hello Xander, I just ran the script. It running without any issues. Not sure how you are facing the issue.

      Is your network connection fast enough? Also, have you switched to the responsive mode by click on the Device toolbar?

      Please follow the video carefully. //Kushal

  3. Amy Bello says:

    HI Kushal,

    I am trying to follow the guide but getting the error

    Uncaught TypeError: Cannot read property ‘click’ of null
    at :9:78

    Can you please help?


    • Kushal Azza says:

      Hi Amy, I just executed the script and was able to delete a couple of posts without any error.

      Please do check the limitation section in the above post. Make sure that you are following DONT’s.

      Often time when we interrupt the script, we get such error. However, let me know if you still encounter it.

      Cheers! //Kushal

  4. Rene Pulido says:

    hi do you have a new script ?

    • Kushal Azza says:

      Hi Rene, this is working without any issues. Is there any problem at your end?

      • Rene says:

        Yes after I paste the Script and hit Enter I get an error
        “Uncaught syntax error: unexpected indetifier”

  5. Rene says:

    I tried again and now I get a different error
    Uncaught Typeerror: cannot read property ‘click’ of null at :10:78

    • Kushal Azza says:

      Hi Rene, I am not sure why it isn’t working at your end. It’s perfectly fine in my system.

      Do you have any extensions that can typically block the ‘click’ action? Please try once in Chrome incognito mode.

      Also, make sure to run the script with the ‘device toolbar’ toggle enabled mentioned in step #4.


  6. Ramesh says:

    I am also cant use this way. . .

    Uncaught TypeError: Cannot read property ‘click’ of null at :5:78
    Uncaught TypeError: Cannot read property ‘click’ of null at :6:78

    • gianna says:

      after all the posts are deleted how do you confirm it because once mine finished i refreshed and it started me all over

  7. Ramesh says:

    Hey Hi, For me this script was not working without any ad blocker extensions. Kindly give a best solution for the below error message

    Uncaught TypeError: Cannot read property ‘click’ of null
    at :5:78

    • Kushal Azza says:

      Hi Ramesh, I do not see any issue. The script is working fine. Can you try in incognito mode?

  8. pr says:

    I changed the time out form 6000 to 8000 on my laptop and it worked.

    • Kushal Azza says:

      Glad to know! 🙂

  9. Modise says:


    Getting an error: VM788:9 Uncaught TypeError: Cannot read property ‘click’ of null
    at :9:78

    • Kushal Azza says:

      The issue is mostly due to a slow network connection speed that unable to load the button element to ‘click’. Try raising the timeout limit. Replace 2000 with 5000, 4000 with 8000, and 6000 to 10000 milliseconds. This will make the execution slower but with a high success rate.

      Let me know how it goes. Thanks! //KushalAzza

      • Modise says:

        The issue still persists unfortunately

      • Kushal Azza says:

        Try increasing the timeout to even higher milliseconds value. Also, run the script in incognito mode without any extensions being active.

  10. hamid says:

    really really thank you !
    helped me alot .

  11. Himanshu Chaudhary says:

    do you have script to follow or unfollow people on instagram?

    • Kushal Azza says:

      I do not have a script, but need to write a few lines of code.

      Thanks for the tip.

  12. Robert says:

    Thank you, was very helpful. I deleted 600 posts from my account with your script.

    • Kushal Azza says:

      Wow!!! Glad to know that, Robert!

  13. haider says:

    i tried your script.but it deletes only i pictures. I tried it on 5 as well as on 10 but same issue arirses as it deletes only one picture

    • Kushal Azza says:

      Probably your internet connection is too slow. Try raising the timeOut in the script to make it a bit slower.

  14. Courtney says:

    hi!! Is there a way to change this code to delete the *oldest* pics. For example, I don’t mind my new pics (2020), but want to delete the old ones (2015). Please let me know!

    • Kushal Azza says:

      Hi Courtney, unfortunately, Instagram does not allow us to sort the post from oldest to newest. Hence, it’s isn’t possible to older posts first and then run the script.

  15. tara says:

    VM104:9 Uncaught TypeError: Cannot read property ‘click’ of null
    at :9:78
    (anonymous) @ VM104:9
    setTimeout (async)
    (anonymous) @ VM104:9
    setTimeout (async)
    instagramDeleter @ VM104:7
    (anonymous) @ VM104:18

    thats the error im seeing please help out.. i want to delete over 5000 posts

    • Kushal Azza says:

      Hello Tara, I don’t see any issue with the script. It’s running fine at my end. Please read the limitations sections before you proceed.

  16. Kenji says:

    Hi… i try ur script it work for 12 post deleted.. but it stop after 12… and showing error
    Uncaught TypeError: Cannot read property ‘click’ of null
    thanks for ur hardwork

    • Kenji says:

      ohh nvm… i found the problem ald.. it because it only load 12 post when i click on feed… so i scroll down until it load all picture first then i start the script.. work like a charm… thank you for the script.. ^^

      • Kushal Azza says:

        You’re welcome, Kenji!

  17. max says:

    it wont load the feed bar its fine on the 3 pic view but will not load the single view mode for me why would this be?

    • Kushal Azza says:

      Try hard reload or refresh on your browser. The script will run only in the single view mode not on the grid mode.

  18. shahid says:

    VM5642:6 Uncaught TypeError: Cannot read property ‘click’ of null
    at :6:78

    • Kushal Azza says:

      The script is unable to find the element to perform ‘Click’ action, make sure you’re following the steps and also read the limitations.

  19. ntokozo says:

    The code does not work at all on my insta. The error message is Uncaught SyntaxError: Unexpected end of input
    6(index):1 Unchecked runtime.lastError: The message port closed before a response was received.
    Please help

    • Kushal Azza says:

      Hello Ntokozo, I don’t see any error. I was able to run the script and delete few test posts. Please read through limitations and follow the steps carefully.

  20. Sally says:

    Hi, the script only works if I press the options button. Otherwise, the script does not work automatically unless I click the options button on my own. Help?

  21. Sarah says:

    Hi, it seems the scripts only work if i manually click the options button. Help?

    • Kushal Azza says:

      Hi Sarah, I don’t find any issue with the script. It working fine at my end.

  22. Pooja Naik says:

    VM247:10 Uncaught TypeError: Cannot read property ‘click’ of null
    at :10:78

  23. Amalia says:

    Hello I am getting “Uncaught TypeError: Cannot read property ‘click’ of null
    at :5:78
    (anonymous) @ VM125:5
    setTimeout (async)
    (anonymous) @ VM125:5
    setTimeout (async)
    instagramDeleter @ VM125:3
    (anonymous) @ VM125:10
    setTimeout (async)
    instagramDeleter @ VM125:3
    (anonymous) @ VM125:10
    setTimeout (async)
    instagramDeleter @ VM125:3
    (anonymous) @ VM125:14” and the same kind of message after each delete but nothing is being deleted.
    I tried this in incognito as well. Thank you, help?

    • Kushal Azza says:

      Hi Amalia, the script is running fine. I don’t see any issues. It’s might be something to do with your browser, or perhaps the IG is testing out new UI. However, will keep an eye on this.

  24. Amalia says:

    I also received this after the above script happened 5 times, “1347d082c4a4.js:86 Cross-Origin Read Blocking (CORB) blocked cross-origin response with MIME type application/json. See for more details.”

  25. Aman Jain says:

    After deleting 12 posts it is not deleting more I have to restart the process

    • Kushal Azza says:

      Hi Aman, that’s probably an issue with Instagram feeds loading due to slow internet or browser caching. What you can do is scroll down to the extreme bottom of your Instagram timeline and run the script. There won’t be any loading issue and the script will delete the feeds smoothly.

Leave a Reply

Your email address will not be published. Required fields are marked *