A browser console script to automatically unfollow people on LinkedIn with human-like behavior patterns to minimize detection risk.
This script is provided for educational purposes only. Automated actions may violate LinkedIn's Terms of Service. Use at your own risk. The authors are not responsible for any consequences including but not limited to account restrictions or bans.
- ✅ Unpredictable random delays between actions (mimics human behavior)
- ✅ Batch processing with longer breaks to avoid rate limiting
- ✅ Human-like mouse movements with randomized click positions
- ✅ Automatic rate limit detection - stops if warnings are detected
- ✅ Configurable safety limits to control maximum unfollows per session
- ✅ Detailed logging with timestamps for monitoring
- ✅ Smooth scrolling with random offsets
- ✅ Session management to prevent excessive automation
The script:
- Finds all "unfollow" buttons on the current page
- Clicks each button with randomized delays (800-2500ms)
- Confirms the unfollow action after a random wait (500-1500ms)
- Takes longer breaks after processing batches (5-10 seconds)
- Scrolls to load more people with human-like timing
- Repeats until no more people are found or limits are reached
Open your browser and go to:
https://www.linkedin.com/mynetwork/network-manager/people-follow/following/
- Chrome/Edge: Press
F12orCtrl+Shift+J(Windows) /Cmd+Option+J(Mac) - Firefox: Press
F12orCtrl+Shift+K(Windows) /Cmd+Option+K(Mac) - Safari: Enable Developer Menu in Preferences, then press
Cmd+Option+C
- Click into the console area
- Type
allow pasting(without quotes) - Press
Enter - Now you can paste scripts
Note: You only need to do this once per browser session. Firefox and Safari don't require this step.
Copy the entire script from mass-unfollow-on-linkedin.js and paste it into the console, then press Enter.
Watch the console output for progress updates. The script will log:
- Number of people found
- Each unfollow action with delays
- Batch completion messages
- Warnings or completion status
To stop the script at any time, simply refresh the page or close the browser tab.
You can customize the script behavior by editing these values at the top:
const config = {
// Random delay ranges (in milliseconds)
clickDelay: { min: 800, max: 2500 }, // Between clicking unfollow
confirmDelay: { min: 500, max: 1500 }, // Before clicking confirm
afterConfirmDelay: { min: 800, max: 2000 }, // After confirming
scrollDelay: { min: 1500, max: 3000 }, // After scrolling
pauseAfterBatch: { min: 5000, max: 10000 }, // Longer pause every N unfollows
batchSize: { min: 8, max: 15 }, // Process this many before long pause
// Safety limits
maxUnfollows: 100, // Maximum total unfollows per session (0 = unlimited)
stopIfTooFast: true // Stop if LinkedIn shows rate limit warning
};Conservative (Safest):
maxUnfollows: 50
clickDelay: { min: 1500, max: 3500 }
pauseAfterBatch: { min: 10000, max: 20000 }Moderate (Balanced):
maxUnfollows: 100
clickDelay: { min: 800, max: 2500 }
pauseAfterBatch: { min: 5000, max: 10000 }Aggressive (Higher Risk):
maxUnfollows: 200
clickDelay: { min: 500, max: 1500 }
pauseAfterBatch: { min: 3000, max: 6000 }The script looks for unfollow buttons using the aria-label attribute. By default, it searches for German labels:
button[aria-label*="nicht mehr zu folgen"]For other languages, modify this line in the getAllButtons() function:
- English:
button[aria-label*="Unfollow"] - Spanish:
button[aria-label*="Dejar de seguir"] - French:
button[aria-label*="Ne plus suivre"] - Portuguese:
button[aria-label*="Deixar de seguir"]
- Start Small: Begin with
maxUnfollows: 20-50to test - Use During Active Hours: Run during times when you'd normally use LinkedIn
- Don't Run Daily: Wait several days between sessions
- Monitor for Warnings: If you see rate limit messages, stop immediately
- Stay on the Page: Don't switch tabs while running (appears more human)
- Increase Delays: If concerned, increase all delay ranges by 50-100%
- Ensure you're on the correct LinkedIn page
- Check browser console for error messages
- Try refreshing the page and running again
- Verify you're on the "Following" page, not "Followers"
- Check if the aria-label matches your LinkedIn language
- Scroll manually to load some people first
- The script should detect this automatically
- Wait 24-48 hours before trying again
- Reduce
maxUnfollowsand increase delays next time
- LinkedIn may have updated their UI
- Check the browser console for the actual button selector
- Update the selector in the script if needed
- Randomized Timing: All delays use random ranges to prevent pattern detection
- Variable Batch Sizes: Each session processes a different number per batch
- Human-like Clicks: Mouse events include randomized coordinates
- Smooth Scrolling: Natural scroll behavior with random offsets
- Warning Detection: Monitors for LinkedIn error/limit messages
- Session Limits: Prevents excessive automation in one session
- ✅ Chrome/Chromium (Recommended)
- ✅ Firefox
- ✅ Edge
- ✅ Safari
- ✅ Brave
- ✅ Opera
Q: Is this safe to use?
A: There's always risk with automation. The script includes many anti-detection features, but LinkedIn could still detect and penalize automated behavior.
Q: How many people can I unfollow per day?
A: LinkedIn's limits aren't public. Conservative recommendation: 50-100 per day maximum, split into multiple sessions.
Q: Will this get my account banned?
A: Possibly. Use conservatively and at your own risk. Many users report no issues with moderate use.
Q: Can I run this multiple times?
A: Yes, but wait several hours between runs. Running it continuously increases detection risk.
Q: What if LinkedIn updates their interface?
A: The script may need updates. Check the selectors and aria-labels if it stops working.
This script may need updates if LinkedIn changes their interface. Feel free to:
- Report issues with LinkedIn UI changes
- Suggest improvements to anti-detection measures
- Share your safe configuration settings
This project is provided as-is for educational purposes. Use responsibly.
Last Updated: October 2025
LinkedIn UI Version: Tested on current LinkedIn interface
Remember: The safest approach is to manually unfollow people. This tool is for those managing large networks who understand and accept the risks.