Skip to main content

BeGoneAds puts some popular hosts file lists into the hosts file as a adblocker measure.

Project description


GitHub code size in bytes GitHub issues GitHub pull requests GitHub made-with-python Awesome Badges

BeGoneAds is a script that puts some popular hosts file lists into the systems hosts file as a adblocker measure.

See it working on asciinema:



  • Python 3.6 or higher

Getting started

Clone this repository:

git clone

Install the program:

python install

You are now ready to use BeGoneAds:


You should see something like:

Usage: begoneads [OPTIONS] COMMAND [ARGS]...

  Install or uninstall BeGoneAds, the host blocker for the system hosts

  --help  Show this message and exit.

  install    Install or update BeGoneAds
  uninstall  Uninstall BeGoneAds


To install the hosts to your system hosts file:

begoneads install

To install the hosts to your system hosts file with custom sources:

begoneads install --sources https://www.custom.sources/hosts,

To install the hosts to your system hosts file with local sources:

begoneads install --local-sources path/to/hosts/file,other/path

The options sources and local-sources can be used together

To uninstall the hosts to your system hosts file:

begoneads uninstall

Sources of hosts data unified in this variant

Updated hosts files from the following locations are always unified and included:

Host file source Home page
Steven Black's ad-hoc list link
Malware Domain List link
add.Dead link
add.Spam link
Dan Pollock link
MVPS hosts file link link
Mitchell Krog's - Badd Boyz Hosts link
CoinBlocker link
UncheckyAds link
add.2o7Net link
KADhosts link
AdAway link
add.Risk link

TODO for 1.0.0

  • <input type="checkbox" disabled="" /> Windows support
  • <input type="checkbox" disabled="" /> Custom selection of host files
  • <input type="checkbox" disabled="" /> Setuptools
  • <input type="checkbox" disabled="" /> Apply own hosts
  • <input type="checkbox" disabled="" /> Systemd integration
  • <input type="checkbox" disabled="" /> Package it for Debian, Arch, CentOS, Fedora, etc.


To run the tests you use pytest

Execute them with pytest in the project directory

Built with

  • requests - Getting the webpage
  • click - Parsing command line options
  • tqdm - Showing a fancy progress bar


This project is licensed under the MIT License - see the file for details

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for begoneads, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size begoneads-0.0.8-py3-none-any.whl (9.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size begoneads-0.0.8.tar.gz (6.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page