What is ripgrep?
ripgrep (the rg command) is a line-oriented search tool written in Rust by Andrew Gallant. It recursively searches the current directory for a regex pattern while respecting your .gitignore rules and automatically skipping hidden files, ignored files and binary files. It is the search engine behind editors like VS Code, and it is generally faster than GNU grep, The Silver Searcher and ack.
--engine auto for transparent PCRE2 fallback, richer --json output and steady throughput gains in its regex engine. The archive version predates most of it.
โก Key Features of ripgrep
๐ Extremely Fast
A finite automata regex engine, SIMD literal scanning, memory maps and parallel directory traversal make it faster than grep on large trees.
๐ Respects .gitignore
Skips ignored files, hidden files and binaries by default, so results are the ones you actually care about. Override with -u, -uu or -uuu.
๐ Full Unicode Support
Unicode-aware by default โ character classes, case folding, word boundaries and grapheme handling all work correctly, at no real speed cost.
๐งฉ PCRE2 Regex
-P unlocks look-around and backreferences. This build has PCRE2 compiled in, so it works out of the box with JIT enabled.
๐ File Type Filtering
Restrict a search to a language with -t rust, exclude with -T html, or define your own types. Over 800 globs ship built in.
๐ Multiline & Replace
Search across line boundaries with -U, preview substitutions with -r, and emit structured results with --json.
apt upgrade keeps you on the latest version.
๐ฆ Installation from deb.griffo.io
Step 1: Add Repository
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
sudo apt updateinstall -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
apt updateStep 2: Install ripgrep
# Install latest ripgrep
sudo apt install ripgrep
# Verify installation
rg --version# Install latest ripgrep
apt install ripgrep
# Verify installation
rg --versionStep 3: Shell Completions
# Completions for bash, zsh and fish ship with the package โ
# nothing to configure. Open a new shell and press Tab:
rg --ty<Tab>
# The manual page is installed too
man rg๐ฏ Basic Usage Examples
Everyday searching:
# Search the current directory tree
rg 'TODO'
# Case-insensitive, whole word
rg -i -w 'timeout'
# Show 3 lines of context around each match
rg -C 3 'panic!'
# List only the files that contain a match
rg -l 'BurntSushi'Filtering what gets searched:
# Only Rust files
rg -t rust 'unsafe'
# Everything except HTML and CSS
rg -T html -T css 'font-size'
# Include ignored and hidden files
rg -uu 'password'
# Restrict with a glob
rg -g '*.toml' 'version'Beyond plain grep:
# Look-around and backreferences via PCRE2
rg -P '(?<=fn )\w+' src/
# Search across line boundaries
rg -U 'struct \w+ \{\n[^}]*pub'
# Preview a substitution (does not write files)
rg 'v(\d+)\.(\d+)' -r 'v$1.$2.0'
# Structured output for scripting
rg --json 'error' | jq -r 'select(.type=="match") | .data.path.text'๐ง Tool Integrations
ripgrep is the search backend a lot of other tooling expects:
- fzf: live-reload interactive grep with
rgas the source - Neovim / Telescope:
live_grepuses ripgrep when it is on PATH - Helix: global search is powered by the same underlying crates
- bat: syntax-highlighted previews of ripgrep hits
- Yazi: file-manager search built on ripgrep
๐ Why Choose deb.griffo.io?
- Official Debian: available, but frozen at the version that shipped with the release
- Manual Installation: requires a Rust toolchain, or hand-managing a binary and its completions
- deb.griffo.io: latest version with automatic updates
- โ Latest Features: newest ripgrep flags, engine improvements and performance work
- โ No Manual Setup: pre-built binaries, no cargo build needed
- โ Automatic Updates: packages updated within hours of upstream releases
- โ
Complete Package:
rg, therg.1man page and bash/zsh/fish completions - โ No Dependencies: statically linked musl build with PCRE2 compiled in
- โ Multi-Distribution: works on Bookworm, Trixie, Forky and Sid
- โ Easy Maintenance: standard apt commands for updates
๐ฆ Package Build Repository
The Debian packages are automatically built and maintained in this GitHub repository:
- ๐ ripgrep-debian - Latest release builds
๐ Related Packages
Also available from deb.griffo.io:
- fzf - Fuzzy finder that pairs with ripgrep for interactive search
- eza - Modern ls replacement
- zoxide - Smart cd command
- Yazi - Uses ripgrep for file searching
.gitignore by default, editor and tooling setups that shell out to rg, and users who care about search speed on big directory trees.
๐ Support This Project
If this repository saves you time and effort, please consider supporting it!