{"id":16293274,"url":"https://github.com/jackblk/facebook_remove_adlist","last_synced_at":"2026-01-20T03:32:21.883Z","repository":{"id":130959029,"uuid":"297731465","full_name":"jackblk/facebook_remove_adlist","owner":"jackblk","description":"Opt yourself out of Facebook advertising","archived":false,"fork":false,"pushed_at":"2022-06-01T18:12:35.000Z","size":47,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T06:51:22.812Z","etag":null,"topics":["advertising","facebook","privacy","privacy-tools","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackblk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-22T18:05:01.000Z","updated_at":"2021-11-18T17:34:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"efe38ddb-cab9-43f0-aab4-4ba7d90cdab1","html_url":"https://github.com/jackblk/facebook_remove_adlist","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackblk%2Ffacebook_remove_adlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackblk%2Ffacebook_remove_adlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackblk%2Ffacebook_remove_adlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackblk%2Ffacebook_remove_adlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackblk","download_url":"https://codeload.github.com/jackblk/facebook_remove_adlist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247367099,"owners_count":20927661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advertising","facebook","privacy","privacy-tools","python"],"created_at":"2024-10-10T20:10:41.879Z","updated_at":"2026-01-20T03:32:21.851Z","avatar_url":"https://github.com/jackblk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/jackblk/facebook_remove_adlist/actions/workflows/ci.yml/badge.svg)](https://github.com/jackblk/facebook_remove_adlist/actions/workflows/ci.yml)\n\n# Facebook adlist remover\n\nDisclaimer: use this repo at your risk.\n## What does it do?\n\nBusinesses will have your info when you use their services (playing games, listening to music...). Then they will upload the info to Facebook and Facebook will use that info to serve you personalized ads.\n\nThis repo will help you to:\n* Exclude yourself (opt-out) from business adlist.\n* Hide all ads from the page that served you ads.\n* Remove all interests that FB collected.\n\nBy doing this:\n* You will be served unrelated ads.\n* By doing it long enough, you will exclude yourself from every ad wave that Facebook is trying to serve to you.\n\nThat means, you will not see any ads for a long time (2-3 months), **then they will come back**. Run this repo again for 1-2 days, you will see no ads anymore.\n\nThis is my experience using this method for **more than 3 years** and it has been working perfectly for me, but it **might not work for you**.\n\n## Docker\n\n[User Guide](https://github.com/jackblk/facebook_remove_adlist/wiki/User-Guide-for-Docker-image)\n\n[Development Guide](https://github.com/jackblk/facebook_remove_adlist/wiki/Development-Guide-for-Docker-image)\n\n## Installation\n### Install dependencies\n\nPython version: \u003e=3.9\n\n`python -m pip install -r requirements.txt`\n\n## Setting up\n\n### For Docker container\n\nGenerate `.env` file in the folder:\n\n```shell\ndocker run --rm -it --entrypoint python -v $(pwd)/.env:/app/.env ghcr.io/jackblk/fb-adlist-remover get_cookies_manual.py\n```\n\nSet Env Var or create a file `.env` in this folder with username/email, password \u0026 TOTP Secret Key (if you have 2FA enabled)\n\n```bash\nFB_EMAIL=\"email_or_username_here\"\nFB_PASSWORD=\"app_password_here\"\nFB_TOTP_2FA_SECRET=\"ZYTYYE5FOAGW5ML7LRWUL4WTZLNJAMZS\" # TOTP only, base32, no whitespace\n# If no email provided, it will use the FB_COOKIES env\nFB_COOKIES=\"your_cookies\"\n```\n\n### For manual cookies generation (optional)\n\nTo generate this step, use `python get_cookies_manual.py`.\nTo do it manually, create a file `.env` in this folder, edit the file with your FB cookies.\n\n```\nFB_COOKIES=\"your_cookies\"\n```\n\nOr you can set it to enviroment variables for your OS.\n\n## Usage\n\nGenerate your cookies manually with `python get_cookies_manual.py`\n\nRun with Docker:\n\n```shell\ndocker run --rm --pull=always \\\n    -v $PWD/.env:/app/.env \\\n    ghcr.io/jackblk/fb-adlist-remover all\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eNon docker\u003c/summary\u003e\nTo view all commands \u0026 helps, run `python fb_adlist.py`\n\nTo run all commands at once:\n```bash\npython fb_adlist.py all\n```\n\n\u003c/details\u003e\n\n### Hide all ads from page\n\nAdvertisers will load as a list, by default it will try to hide 2 lists.\nUse option `--count` or `-c` to load more than 2 lists.\n```bash\npython fb_adlist.py del-ad -c 10\n```\n\nYou can check the result here: [Advertisers](https://www.facebook.com/adpreferences/advertisers)\n### Opt out from business adlist \u0026 Removing interests\n```bash\n# Opt-out of business adlist\npython fb_adlist.py opt-out\n# Remove all interests\npython fb_adlist.py rm-interest\n```\n\nCheck the result here: [Ad settings](https://www.facebook.com/adpreferences/ad_settings), Audience-based advertising \u0026 Interest categories.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackblk%2Ffacebook_remove_adlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackblk%2Ffacebook_remove_adlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackblk%2Ffacebook_remove_adlist/lists"}