# Install bgpq4 with Homebrew, apk, apt, dnf, Nix

BGP filtering automation for Cisco, Juniper, BIRD and OpenBGPD routers. Version 1.16 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:bgpq4
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install bgpq4
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add bgpq4
```

  Evidence: Alpine Linux edge package indexes: bgpq4 from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install bgpq4
```

  Evidence: Debian stable package indexes: bgpq4 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install bgpq4
```

  Evidence: Fedora Rawhide package metadata: bgpq4 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#bgpq4
```

  Evidence: nixpkgs package indexes: pkgs/by-name/bg/bgpq4/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:bgpq4
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/bgpq4>
- **Version:** 1.16
- **Source summary:** BGP filtering automation for Cisco, Juniper, BIRD and OpenBGPD routers
- **Homepage:** <https://github.com/bgp/bgpq4>
- **Repository:** <https://github.com/bgp/bgpq4>
- **Upstream docs:** <https://github.com/bgp/bgpq4#readme>
- **License:** BSD-2-Clause
- **Source archive:** <https://github.com/bgp/bgpq4/archive/refs/tags/1.16.tar.gz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- bgpq4 (cli)
- bgpq4 (alias)

## Build dependencies

- autoconf
- automake
- libtool

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.16
- Local data: ok
- Upstream repository: https://github.com/bgp/bgpq4
- Upstream latest detected: 1.16 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

bgpq4 is the modern bgpq-family CLI for generating router filters from IRR data. It keeps the operator-friendly model of bgpq3 while focusing on newer IRRd behavior, newer vendor outputs, and ongoing maintenance.

### Project history

The bgpq4 changelog explicitly records version 0.0.1 in 2019 as the point where bgpq3 was forked into bgpq4. The repository preserves older bgpq3 history back to the 2007 rewrite, but the bgpq4 line is documented as the post-2019 fork.

Early bgpq4 releases removed legacy options, improved performance by using IRRd 4's A query when available, and added Mikrotik support. Later releases reorganized the source tree, adopted OpenBSD-style formatting, reduced memory use with a red-black tree for ASN storage, and added outputs such as Junos as-path-origin, Nokia SR Linux, Mikrotik RouterOS v6/v7, Arista EOS, Huawei XPL, and other router-policy formats.

### Adoption history

The input metadata lists bgpq4 packages across Alpine, Homebrew, Debian, Fedora/DNF, Nix, and Ubuntu, and the upstream README includes a packaging-status badge. That breadth matters because bgpq4 is the sort of tool network engineers want available on jump hosts, CI runners, and laptops without hand-building it.

### How it is used

The README describes bgpq4 as producing prefix lists, extended access lists, policy-statement terms, and AS-path lists from IRR objects. Operators pass ASNs, AS sets, route sets, or prefixes, select sources such as RPKI, AFRINIC, ARIN, APNIC, LACNIC, and RIPE, and choose target syntax for Cisco, Juniper, BIRD, OpenBGPD, Nokia, Mikrotik, Huawei, Arista, or JSON output.

### Why package nerds care

bgpq4 is a package-nerd favorite because it condenses a brittle BGP edge-operations task into a single auditable binary. It is small C code, has no daemon to operate, emits plain text suitable for config generation pipelines, and exists precisely where package managers shine: getting a boring but critical network-ops tool onto many Unix-like systems.

### Timeline

- 2007: The inherited bgpq-family Git history begins with the bgpq3 rewrite.
- 2019: bgpq3 is forked into bgpq4; early releases remove legacy flags and use IRRd 4's A query when available.
- 2021: Version 1.3 reorganizes the repository, reformats large parts of the code, and reduces memory use.
- 2022: Version 1.5 adds Junos as-path-origin support.
- 2023: Versions 1.10 and 1.11 add Nokia SR Linux support and tighten AS23456 handling.
- 2026: Version 1.16 is released.

### Related projects

- bgpq3 is the direct predecessor. The tool also lives beside IRRd, RADB-style IRR services, RPKI-aware workflows, and router stacks such as Cisco IOS/IOS XR, JunOS, BIRD, OpenBGPD, Nokia SR OS/SR Linux, Mikrotik RouterOS, Huawei, and Arista EOS.

### Sources

- <https://api.github.com/repos/bgp/bgpq4>
- <https://github.com/bgp/bgpq4#readme>
- <https://raw.githubusercontent.com/bgp/bgpq4/main/CHANGES>
- input.source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** bgpq4
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - bgpq4 - 1.12-1: normalized package name match | Debian stable package indexes: bgpq4 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | automatic BGP filter generator using IRR routing data | https://github.com/bgp/bgpq4
- Nix - bgpq4: normalized package name match | nixpkgs package indexes: pkgs/by-name/bg/bgpq4/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - bgpq4 - 1.12-1: normalized package name match | Ubuntu 24.04 LTS package indexes: bgpq4 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | automatic BGP filter generator using IRR routing data | https://github.com/bgp/bgpq4
- apk - bgpq4 - 1.16-r0: normalized package name match | Alpine Linux edge package indexes: bgpq4 from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | bgp filtering automation tool | https://github.com/bgp/bgpq4
- apk - bgpq4-doc - 1.16-r0: normalized package name match | Alpine Linux edge package indexes: bgpq4-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | bgp filtering automation tool (documentation) | https://github.com/bgp/bgpq4
- dnf - bgpq4 - 1.16-1.fc45: normalized package name match | Fedora Rawhide package metadata: bgpq4 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Automate BGP filter generation based on routing database information | https://github.com/bgp/bgpq4


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Productivity CLI packages](https://www.automicvault.com/pkg/productivity-cli-packages/) - Matched curated productivity category metadata from av.db.
- [autoconf](https://www.automicvault.com/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://www.automicvault.com/pkg/brew/automake/) - Build dependency declared by Homebrew.
- [libtool](https://www.automicvault.com/pkg/brew/libtool/) - Build dependency declared by Homebrew.
- [bgpq3](https://www.automicvault.com/pkg/brew/bgpq3/) - Package name indicates the same formula family.
- [bgpdump](https://www.automicvault.com/pkg/brew/bgpdump/) - Shares av.db curated category or tags: bgp, cli, networking.
- [bgpstream](https://www.automicvault.com/pkg/brew/bgpstream/) - Shares av.db curated category or tags: bgp, cli, networking.
- [monocle](https://www.automicvault.com/pkg/brew/monocle/) - Shares av.db curated category or tags: bgp, cli, networking.
- [rpki-client](https://www.automicvault.com/pkg/brew/rpki-client/) - Shares av.db curated category or tags: bgp, cli, networking.
- [zebra](https://www.automicvault.com/pkg/brew/zebra/) - Shares av.db curated category or tags: bgp, cli, networking.
- [activemq](https://www.automicvault.com/pkg/brew/activemq/) - Shares av.db curated category or tags: cli, networking.
- [adns](https://www.automicvault.com/pkg/brew/adns/) - Shares av.db curated category or tags: cli, networking.
- [dynamips](https://www.automicvault.com/pkg/brew/dynamips/) - Local package facts share a topical domain. Shared terms: cisco, cli, networking, routers.

## Combined YAML source

View the package source record on GitHub. [combined/bgpq4.yml](https://github.com/automic-vault/db/blob/main/combined/bgpq4.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
