Automic VaultAutomic Vault

brew

Install grepcidr with Homebrew, apt, dnf, MacPorts, Nix, zypper

Filter IP addresses matching IPv4 CIDR/network specification. Version 2.0 via Homebrew; verified from local package data.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install grepcidr

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install grepcidr

MacPorts ports tree · sysutils/grepcidr/Portfile · source: api.github.com

Linux

Debian aptverified · 92%
sudo apt install grepcidr

Debian stable package indexes · grepcidr · source: deb.debian.org

Fedora dnfverified · 92%
sudo dnf install grepcidr

Fedora Rawhide package metadata · grepcidr · source: dl.fedoraproject.org

Nixverified · 92%
nix profile install nixpkgs#grepcidr

nixpkgs package indexes · pkgs/by-name/gr/grepcidr/package.nix · source: api.github.com

openSUSE zypperverified · 92%
sudo zypper install grepcidr

openSUSE Tumbleweed package metadata · grepcidr · source: download.opensuse.org

overview

Package summary

Filter IP addresses matching IPv4 CIDR/network specification

Commands and aliases

  • grepcidr

history

Project history and usage

grepcidr is a small C command-line filter for matching IPv4 and IPv6 addresses against CIDR patterns. It borrows grep's interface style for a networking-specific job: select or reject log lines by address range.

Project history

Jem Berkes identifies the pc-tools.net grepcidr as the original project, created in 2004 and released as grepcidr 2.0 on 2014-05-26. The official page emphasizes that the 2.0 line is distinct from John Levine's separately developed fork, even though both names can confuse users.

Version 2.0 added IPv6 support, replaced a regex-based scanner with a hints scanner reported as faster on some platforms, enforced stricter IP text matching, added multiple file arguments, supported unlimited input line length, and improved CIDR validation.

Adoption history

grepcidr's niche is operational networking: mail filtering, network security, log analysis, and custom pipelines where a full IP-address database or firewall tool would be too heavy. Its adoption in package managers follows from being a single-purpose Unix filter with no documented configuration or credential state.

How it is used

The official examples show grepcidr matching an IPv6 documentation prefix against a log file and matching a Googlebot-era IPv4 CIDR range against access.log. Options include count output, inverted matching, strict CIDR alignment, strict start-of-line matching, command-line patterns, and pattern files.

Why package nerds care

grepcidr is package-nerd significant because it is a tiny specialist filter that fills a gap between grep and heavier network-analysis tools. It lets shell users keep grep-like pipelines while making CIDR math correct enough for log and abuse workflows.

The official fork note matters for packaging: downstreams need to know whether they are shipping Berkes' grepcidr 2.0 line or Levine's unrelated implementation.

Timeline

  • 2004: Original grepcidr project created, according to the official project page.
  • 2014: grepcidr 2.0 released with IPv6 support, faster scanning, stricter matching, and multiple-file support.
  • 2014: Official page documented the distinction between Berkes' project and the separately developed grepcidr-2 fork.

Related projects

  • grep is the interface model for matching and inverted matching.
  • John Levine's grepcidr-2 fork is called out by the official page as an unrelated implementation.
  • Spamhaus is credited on the official page for sponsorship and testing of features.

security posture

Risk level: blue

broad file, network, media, or database tool signal.

Risk classifier

blue risk · medium confidence · tool

Why

  • broad file, network, media, or database tool signal

Signals

  • text:network

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 13 platform targets.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
grepcidrcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version2.0
manager updated
local dataok
upstreamnot checked
latest detectednot detected

https://www.pc-tools.net/unix/grepcidr/

install metadata

Package metadata

Package keybrew:grepcidr
Version2.0
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/grepcidr
Homepagehttps://www.pc-tools.net/unix/grepcidr/
Upstream docshttps://www.pc-tools.net/unix/grepcidr
LicenseGPL-2.0-or-later
Source archivehttps://www.pc-tools.net/files/unix/grepcidr-2.0.tar.gz
Bottleavailable (on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namegrepcidr
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Debian apt95%

grepcidr 2.0-2

Filter IP addresses matching IPv4/IPv6 CIDR/network specification

http://www.pc-tools.net/unix/grepcidr/

sudo apt install grepcidr
  • Section: net
  • Architecture: amd64
  • 1 dependencies
  • normalized package name match
  • Matched by: Grepcidr
Debian stable package indexes · deb.debian.org · Debian stable package indexes: grepcidr from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

grepcidr

nix profile install nixpkgs#grepcidr
  • normalized package name match
  • Matched by: Grepcidr
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/gr/grepcidr/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

grepcidr 2.0-2

Filter IP addresses matching IPv4/IPv6 CIDR/network specification

http://www.pc-tools.net/unix/grepcidr/

sudo apt install grepcidr
  • Section: universe/net
  • Architecture: amd64
  • 1 dependencies
  • normalized package name match
  • Matched by: Grepcidr
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: grepcidr from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
dnf95%

grepcidr 2.0-12.fc44

Filter IPv4 and IPv6 addresses matching CIDR patterns

https://www.pc-tools.net/unix/grepcidr/

sudo dnf install grepcidr
  • License: GPL-2.0-or-later
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: grepcidr
  • 2 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Grepcidr
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: grepcidr from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
zypper95%

grepcidr 2.0-2.6

Filter IP addresses matching IPv4/IPv6 CIDR specification

http://www.pc-tools.net/unix/grepcidr/

sudo zypper install grepcidr
  • License: GPL-3.0-or-later
  • Category: Productivity/Text/Utilities
  • Architecture: x86_64
  • Source Package: grepcidr
  • 1 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Grepcidr
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: grepcidr from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst
MacPorts95%

grepcidr

sudo port install grepcidr
  • normalized package name match
  • Matched by: Grepcidr
MacPorts ports tree · api.github.com · MacPorts ports tree: sysutils/grepcidr/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

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