pacsift
Search Pacman packages and files
TLDR
List all available packages
Filter packages that provide a given package
SYNOPSIS
pacsift [options] [<query>]
PARAMETERS
-s, --sync
Search the sync database (repositories) instead of the local database.
-i, --info
Display detailed package information (like pacman -Si/pacman -Qi).
-g, --groups
Filter by package groups.
-r, --repo
Filter by repository name.
-l, --list
List unique values for a specified field (e.g., repos, groups).
-p, --quiet
Suppress output headers.
-v, --verbose
Display the full package description.
-f <field>, --field <field>
Specify the field to search (e.g., name, desc, group, repo).
-w, --word
Match whole words only.
-c, --case
Perform a case-sensitive search.
-x, --regex
Use extended regular expressions (this is the default behavior).
-e, --exact
Perform an exact string match.
-o, --origin
Filter packages by their installation origin (e.g., explicit, dependency).
-u, --upgrades
Show only packages that have available upgrades.
-S <field>, --sort <field>
Sort results by a specified field (e.g., name, size, version).
-D, --desc
Sort results in descending order.
-h, --help
Display a help message and exit.
-V, --version
Display version information and exit.
DESCRIPTION
pacsift is a powerful command-line utility for Arch Linux that enables users to efficiently search and filter packages within the
pacman database. It acts as an intelligent wrapper around
pacman -Qs (for installed packages) and pacman -Ss (for repository packages), providing a more structured and flexible way to query package information.
Unlike basic
grep pipes, pacsift understands various package fields like name, description, group, repository, and origin, allowing users to target their searches precisely. It supports regular expressions, case sensitivity, whole-word matching, and can display detailed package information or list unique values for specific fields, making it an invaluable tool for system administration and package management.
CAVEATS
pacsift relies on pacman's database and output format. Changes in pacman's behavior or output could potentially affect pacsift's functionality. It requires the pacman-contrib package to be installed on Arch Linux.
USAGE EXAMPLES
Search sync database for "linux":
pacsift -s linux
Filter installed packages by the "base-devel" group:
pacsift -g base-devel
List all unique repository names:
pacsift -l repo
Show upgradable packages:
pacsift -u
Search for packages with "python" in their name or description in a case-sensitive manner:
pacsift -c python
INTEGRATION WITH PACMAN
pacsift leverages pacman's capabilities, essentially parsing and enhancing its output for more user-friendly and precise filtering. It streamlines the process of extracting relevant package information without needing complex shell pipelines.
HISTORY
pacsift is part of the pacman-contrib package, which provides various helper scripts and tools for pacman. It emerged to address the need for more sophisticated package searching and filtering capabilities beyond what pacman -Qs or pacman -Ss combined with simple piping could offer, providing a more structured and field-aware approach to querying package metadata.