Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

auto unfollow script for those you follow but not following back on GitHub, you simply run using Codespaces !

License

NotificationsYou must be signed in to change notification settings

jfullstackdev/github-unfollow-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auto unfollow script for those you follow but not following back on GitHub !

Run With GitHub Codespaces

you can even simply do this on GitHub Codespaces

To run the script in GitHub Codespaces:

  1. (optional) Fork the repository to your own GitHub account.
  2. Open a GitHub Codespace:
    • If you forked the repository, open it in GitHub Codespaces.Theunfollow.js file should already exist.
    • Otherwise, open any other Codespace.Create a new file namedunfollow.js and paste the JavaScript code into it.
  3. Open a terminal in Codespaces (View > Terminal).
  4. Replace'your_username' and'your_token_with_correct_permission' in thescript with your actual GitHub username and personal access token.
  5. in the terminal, to install the Octokit library, run
    npm install
    note: if you're using GitHub Codespaces, this step may have already been run automatically
  6. run the script with
    SCRIPT_USERNAME=your_username SCRIPT_TOKEN=your_token SCRIPT_LIMIT=2500 node unfollow.js
    (Change SCRIPT_LIMIT to your desired subset size. If not set, defaults to 1000.)

Note:

  • The above one-line command works in Codespaces, as I tested it myself.
  • On local Windows (Command Prompt or PowerShell), this command might not work as shown.If you are on Windows and encounter issues, it is highlyencouraged to use GitHub Codespaces for a seamless experience.

USE CASE

I tested it in one run—up to 4K users can be scanned, but it will take afew minutes. Make sure you have a stable connection, and I did not hitthe rate limit during my tests. Enjoy!

You can safely process your following list in chunks (for example,2,500 users at a time, running the script 4 times, or increasing thelimit to 10,000 to ensure none are left). This approach helps ensureall non-followers are eventually unfollowed while keeping each runfast and manageable.

This script is optimized for accounts with up to25,000 followingand25,000 followers (about 50,000 users total). It is safe andefficient for these sizes on most modern systems.

Recommended usage for best performance:

  • For faster runs and to avoid long waits, process your following listin chunks (e.g., 2,500–10,000 users per run).
  • You can re-run the script multiple times with different randomsamples to ensure all non-followers are eventually unfollowed.
  • Example: Run with a limit of 2,500 users, four times, or increasethe limit to 10,000 for broader coverage per run.

Note:

  • For much larger accounts (over 50,000 following or followers),consider using a more advanced version with persistent storage orbatching.
  • Always monitor for GitHub API rate limits if processing very largelists.

About

auto unfollow script for those you follow but not following back on GitHub, you simply run using Codespaces !

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp