Instagram Mass Archive/Delete
If you would like to archive or delete all of your Instagram posts without having to go through every single one of your posts manually, then I have found a solution!
-
Navigate to “Photos and Videos” in the Instagram web app, which can be found at https://www.instagram.com/your_activity/photos_and_videos/posts/
-
Click “Select” in the top right of the window
-
Make sure to scroll all the way down through all your posts so they are all loaded in
-
Open your web console (Right click webpage, select “Inspect Element”, select “Console” tab)
-
Paste in the following code and press Enter
async function selectAllPosts(){
// Selects all the post images
posts = document.querySelectorAll('[data-bloks-name="bk.components.Image"]');
var i = 0;
while( i < posts.length && i <= 100 ){
// We use the click function contained in the 3rd parent element
// of each image to select each post
posts[i].parentElement.parentElement.parentElement.click();
// Wait 1ms between each selection to allow it to be recognized
await new Promise(resolve => setTimeout(resolve, 1));
i++;
}
}
selectAllPosts();
- Since you can only select 100 posts at a time, you will need to click “archive” or “delete” once 100 are selected, then repeat Step 5 until all your posts are archived or deleted.