- Go to your profile on instagram.com (sign in if not already)
- Click on
XXX following
for the popup with the users you're following to appear - Open Chrome Devtools and Paste the following into the Console and hit return:
(async function(){
const UNFOLLOW_LIMIT = 800
const delay = (ms) => new Promise(_ => setTimeout(_, ms))
const findButton = (txt) => [...document.querySelectorAll("button").entries()].map(([pos, btn]) => btn).filter(btn => btn.innerHTML === txt)[0]
console.log("Start")
for (let i = 0; i < UNFOLLOW_LIMIT; i++) {
const $next = findButton("Following")
if (!$next) { continue }
$next.scrollIntoViewIfNeeded()
$next.click()
await delay(100)
$confirm = findButton("Unfollow")
if ($confirm) {
$confirm.click()
}
await delay(20 * 1000) // Wait 20s, 200 unfollows per hour limit
console.log(`Unfollowed #${i}`)
}
console.log("The end")
})()
(async function () {
const MAX_PER_DAY = 400; // Maximum number of unfollows allowed per day
const PAUSE_AFTER_BATCH = 10; // Pause after every 10 unfollows
const PAUSE_DURATION = 10 * 60 * 1000; // Pause duration: 10 minutes (in ms)
const delay = (ms) => new Promise(r => setTimeout(r, ms));
const randomDelay = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;
const findButton = (txt) => [...document.querySelectorAll("button")].find(btn => btn.innerText === txt);
// Use localStorage to track today's date and unfollow count
const today = new Date().toISOString().split("T")[0]; // format: YYYY-MM-DD
const key =
unfollowed_${today}
;const alreadyUnfollowed = parseInt(localStorage.getItem(key) || "0");
// If daily limit reached, stop immediately
if (alreadyUnfollowed >= MAX_PER_DAY) {
console.log(
π Daily limit of ${MAX_PER_DAY} unfollows already reached.
);return;
}
window.STOP_UNFOLLOW = false;
let unfollowed = alreadyUnfollowed;
console.log(
π Start unfollow session (${unfollowed}/${MAX_PER_DAY} already unfollowed today)
);for (let i = 0; unfollowed < MAX_PER_DAY; i++) {
if (window.STOP_UNFOLLOW) {
console.log("π Unfollow process manually stopped.");
break;
}
}
console.log(
π Finished session. Total unfollowed today: ${unfollowed}
);})();