pacman-debian
v7.8.0
Published
A Debian/Ubuntu package manager using Arch Linux pacman syntax. Manages .deb packages at dpkg level, supports Arch .pkg.tar.zst, AUR helpers (yay), and makepkg. Configurable multi-repo setup.
Maintainers
Readme
pacman-debian
A package manager that adopts the Arch Linux pacman command-line syntax while
operating directly on Debian/Ubuntu .deb packages. It manages packages at the
dpkg level — bypassing APT — and also supports native Arch Linux .pkg.tar.zst
packages (including AUR compatibility via yay with a bundled libalpm).
Highlights (some of the notable features):
- Zero dpkg dependency — version comparison algorithm ported from libdpkg,
dpkg status parsed directly, no
dpkgcommand required - Byte-indexed database — sorted idx with binary search, JSONL chunk storage
- In-memory cache — idx files loaded once, package data cached by offset
- Sub-100ms search — across 3000+ packages via idx scan + cached reads
- Release-based Debian sync — fetches
InRelease/Releasefirst, validates SHA256 before downloading Packages (like apt) - XferCommand — custom download commands (aria2c, curl, wget)
- Paclink file backend — mappings stored in
/var/lib/pacman-debian/paclinks, C shim reads directly, no recompilation needed for new mappings - Official-style operation help —
-S,-R,-Q,-D,-T,-F, and-Ueach have their own localized--helpoutput - Better upgrade summaries — verbose upgrades show repository, old/new versions, download size, and net installed-size change
- More complete upgrades —
-Syuhandles dpkg-only packages and explicit targets through the same transaction path - Safer package source changes — source takeover warnings and localized confirmation prompts are shown before package records and files change owners
- More reliable local database lookups — package names are matched exactly, so
packages such as
pipewireandpipewire-bincannot be confused - Pacman-style version output —
pacman -Vandpacman pacmanshow the Pac-Man banner with localized version text - Standalone paclink source — Arch-to-Debian mappings sync from the separate
xbodwf/paclinksrepository and write dpkgProvides:entries - Fast mapping transactions —
paclink -Syuapplies mapping changes in a batch instead of rewriting local indexes for every package - Official-style progress output — downloading, install/upgrade/downgrade/reinstall,
and removal progress bars mirror upstream pacman, with
.pacnewand "local package is newer than the repository" warnings - Foreign package query —
-Qm/-Qmqlist installed packages not in any synced repository, and-S -/-U -read the target list from stdin
Introduction
Goals
- Provide a consistent, pacman-style CLI for package management on Debian-based
systems, eliminating the conceptual overhead of switching between
apt,dpkg, and their various frontends. - Support multi-repository setups combining Debian/Ubuntu and Arch Linux repositories under a single tool.
- Maintain full compatibility with dpkg's database (
/var/lib/dpkg/status), allowing coexistence with APT and other dpkg frontends. - Provide a libalpm ABI-compatible shared library so that Go-based AUR helpers (yay) can work on Debian without modification.
Project Status
Functional for day-to-day package management on Debian-based distributions. See Project Status for details.
Installation
Requirements
- Node.js 18+
- Debian-based distribution (Debian, Ubuntu, Armbian, Linux Mint, etc.)
- Root privileges for write operations
- Build essentials:
gcc,make,ldconfig(for libalpm C library)
Install
sudo npm install -g pacman-debian@latest
sudo $(which pacman-debian-setup)[!WARNING]
npm install -gmust be run undersudoor as therootuser. If you install as a regular user, Node.js will placepacman-debianinto your home directory (~/.npm-global/or similar), making it susceptible to tampering, malicious modification, or breakage by other users or scripts on the system. Always usesudo npm install -g.
After installation, run this to migrate the system's APT sources and start using pacman-debian:
sudo pacmigrate setupThen sync the package sources and perform a full system upgrade:
sudo pacman -Sy
sudo pacman -Syupacmigrate setup reads both traditional sources.list/.list files and Ubuntu
24.04 deb822 .sources files. It leaves the APT files untouched, backs up the
current pacman-debian configuration, and asks about common pacman options.
Synchronize Arch-to-Debian compatibility mappings separately:
sudo paclink -Syupaclink uses the standalone paclinks repository
as its mapping source. -Sy syncs it, -Su uses the cached source, and -U
installs a local mapping file. Mapping packages are activated only when their
Debian targets are installed. Active mappings are also written as dpkg
Provides: entries, so APT and dpkg dependency checks can see them. Removing a
target removes the mapping and warns if an installed Arch package still depends
on that virtual name. See paclink documentation for
verification commands.
Development Install
git clone https://github.com/xbodwf/pacman-debian.git
cd pacman-debian
pnpm install && pnpm build
sudo node dist/scripts/setup.jsSee Installation for details.
Quick Start
# Search
pacman -Ss neofetch
# Install
sudo pacman -S neofetch
# Remove
sudo pacman -R neofetch
# Upgrade all
sudo pacman -Syu
# Query installed
pacman -QSee Usage for complete command reference.
Documentation
| Topic | English | 中文 | |-------|---------|------| | Usage (full command reference) | docs/en/usage.md | docs/zh-CN/usage.md | | Configuration | docs/en/configuration.md | docs/zh-CN/configuration.md | | Architecture & Database | docs/en/architecture.md | docs/zh-CN/architecture.md | | makepkg | docs/en/makepkg.md | docs/zh-CN/makepkg.md | | libalpm & yay/AUR | docs/en/yay-aur.md | docs/zh-CN/yay-aur.md | | paclink (package links) | docs/en/paclink.md | docs/zh-CN/paclink.md | | Installation (detailed) | docs/en/installation.md | docs/zh-CN/installation.md |
License
GNU General Public License v3.0
