Instagram Ghost Remover | A Tool To Remove Ghost Followers


Instagram Ghost Remover

A tool that will remove followers that haven’t liked or commented on a single post of yours.


Even though people are trying to increase their follower count, the quality of their followers may decrease. It is not uncommon to see people with 50K followers but only ~1500 likes at their posts. This tool aims to remove low-quality followers from your account.

How does it work?

The tool will load all of your followers, all of your posts, all likes under the posts and all comments under the posts. Then, it will count all the likes and comments under your posts from your followers. At the end of the process, if a follower does not have any likes or comments, they’ll be marked as a ghost. Finally it will force them out of your follower list by blocking and unblocking them. The whole process may take minutes to days, depending on the number of your followers. You may pause and resume it though (in case you need to turn your computer off in the middle).

Usage (tried to make it easy for non savvy people)

  • Download this repo (this whole thing) as ZIP and unzip it.
  • Open your terminal. (On Mac: open the Terminal app, on Windows, open Command Prompt, on Linux, well you probably know what you are doing anyway ;))
  • Check Python version. (On Mac: type python -V , on Windows, type python . Press Enter. If you see something like Python 2.7 (I’ve tested on 2.7.10) great. If you get an error or see a Python 3.x version, download Python 2.7 (Google it). (Would it work with Python 3? Maybe, but I didn’t test it.)
  • Go to the folder that you unzipped this repo from the terminal. (Type cd full_path_to_your_folder , for example cd C:\Downloads\instagram-ghost-remover or cd /Users/Name/Downloads/instagram-ghost-remover . Of course these are just examples. You can just type cd (with a space after it) and drag-drop your folder into the terminal window to paste the full path to it). Press Enter.
  • Type pip install -r requirements-dev.txt . Press Enter. It may take a few minutes to complete. When it stops downloading stuff and waits for you again, it’s done. If no errors, proceed to next step. If it fails with a bunch of errors , On Mac: sudo pip install -r requirements-dev.txt (it will ask your password, that’s your computer’s password, NOT your instagram password), On Windows: close Command Prompt and run it as administrator by right clicking and choosing so. Make sure you do the “cd” step again to go to the correct folder)
  • Type python . Press Enter.
  • After that point, the whole thing is self explanatory. It will load a list of your followers, posts, likes your your posts, and comments on your posts. It may take a while (e.g. minutes, or about an hour or more if you’ve got lots of followers/posts etc). When it’s done it will start blocking/unblocking those “ghost” followers that I explained earlier. You may stop (if you think it’s enough or if you need to pause) when it starts blocking/unblocking by simply closing the terminal window.


The folder will contain your username and password in the file and credentials.pyc . Make sure those two files are safe from other people.


  • The tool may not load more than 1000 likes for a single post. In 99% of the cases, I think we can ignore it.
  • To avoid API limiting (Instagram doesn’t allow too many actions in a short time) the tool waits randomly between blocks. If you get an API rate limit error, simply wait about an hour and run again.
  • I am not a Python programmer, I’m just getting used to it. Some parts of the code may be terrible. Sorry for that :slight_smile:

Resuming after stopping

If you’ve stopped the tool and want to resume:

  • Open your terminal.
  • Go to the folder with the unzipped files again. Type python . Press Enter. It should resume.

Below is the original readme for Instagram Private API (not written by me):

Instagram Private API

A Python wrapper for the Instagram private API with no 3rd party dependencies. Supports both the app and web APIs.

Python 2.7, 3.5 Release Docs Build



I wrote this to access Instagram’s API when they clamped down on developer access. Because this is meant to achieve parity with the official public API, methods not available in the public API will generally have lower priority.

Problems? Please check the docs before submitting an issue.


An extension module is available to help with common tasks like pagination, posting photos or videos.


Documentation is available at


Install with pip:

pip install git+https://[email protected]/ping/[email protected]

To update:

pip install git+https://[email protected]/ping/[email protected] --upgrade

To update with latest repo code:

pip install git+https://[email protected]/ping/instagram_private_api.git --upgrade --force-reinstall

Tested on Python 2.7 and 3.5.


The app API client emulates the official app and has a larger set of functions. The web API client has a smaller set but can be used without logging in.

Your choice will depend on your use case.

The examples/ and tests/ are a good source of detailed sample code on how to use the clients, including a simple way to save the auth cookie for reuse.

Option 1: Use the official app’s API

from instagram_private_api import Client, ClientCompatPatch user_name = ‘YOUR_LOGIN_USER_NAME’ password = ‘YOUR_PASSWORD’ api = Client(user_name, password) results = api.feed_timeline() items = [item for item in results.get(‘feed_items’, []) if item.get(‘media_or_ad’)] for item in items: # Manually patch the entity to match the public api as closely as possible, optional # To automatically patch entities, initialise the Client with auto_patch=True[‘media_or_ad’]) print(item[‘media_or_ad’][‘code’])

Option 2: Use the official website’s API

from instagram_web_api import Client, ClientCompatPatch, ClientError, ClientLoginError # Without any authentication web_api = Client(auto_patch=True, drop_incompat_keys=False) user_feed_info = web_api.user_feed(‘329452045’, count=10) for post in user_feed_info: print(’%s from %s’ % (post[‘link’], post[‘user’][‘username’])) # Some endpoints, e.g. user_following are available only after authentication authed_web_api = Client( auto_patch=True, authenticate=True, username=‘YOUR_USERNAME’, password=‘YOUR_PASSWORD’) following = authed_web_api.user_following(‘123456’) for user in following: print(user[‘username’]) # Note: You can and should cache the cookie even for non-authenticated sessions. # This saves the overhead of a single http request when the Client is initialised.

Avoiding Re-login

You are advised to persist/cache the auth cookie details to avoid logging in every time you make an api call. Excessive logins is a surefire way to get your account flagged for removal. It’s also advisable to cache the client details such as user agent, etc together with the auth details.

The saved auth cookie can be reused for up to 90 days .



If we have 10 million followers(Say) but frequently we got 5000 likes and <5000 comments(assume), does it considers all remaining followers as ghosts and removes them??
Does it mean a loss to the one being followed?