Oil

July 13, 2026 · View on GitHub

Oil is a native Linux package manager that works on any distribution. Like Nix, it installs packages to its own prefix and doesn't conflict with the host package manager. Unlike Nix, Oil is minimal, fast, and focused on generation-based rollback.

Design

  • Works everywhere — no distro-specific bootstrap. One binary.
  • Own prefix — installs to /usr/local/oil or ~/.local/oil. No /usr pollution.
  • Generation rollback — every install creates a snapshot. Rollback with oil rollback.
  • OS-gated — compile with --no-default-features to strip unused system registries.
  • System registries — built-in parsers for APT, DNF, Pacman, APK, XBPS, Nix, and Linuxbrew repos. These are read-only data sources for resolving packages. Oil never delegates to host package managers. Installed files and Oil-owned state remain the source of truth.

Quick start

# Install oil (latest release)
curl -fsSL https://github.com/semitechnological/oil/releases/latest/download/oil-linux-x64 -o ~/.local/bin/oil
chmod +x ~/.local/bin/oil

# Or build from source
cargo install --git https://github.com/semitechnological/oil

# Bootstrap packages from your distro's repos (read-only)
oil search ripgrep
oil install ripgrep

Build

cargo build
cargo build --no-default-features --features "system-xbps,system-apk"

Alpenglow aarch64 benchmark

This is an Alpenglow-specific result, not a general Oil benchmark.

MetricOilapk
Cold index refresh median1.845 s2.057 s
Cached search busybox median0.641 s1.458 s
Binary size2.15 MiB67.6 KiB
Index cache1.78 MiB2.46 MiB

Three cold runs before the cache-format change on an Alpine 3.21 aarch64 guest under QEMU TCG (not hardware or HVF). Oil's gzip cache is 5.5x smaller than its prior 9.90 MiB raw cache. Package installation was excluded because hello was unavailable to both commands in this guest.

Install script

A convenience installer is included:

# From a clone:
./install.sh

# Or download the latest release binary:
curl -fsSL https://raw.githubusercontent.com/semitechnological/oil/master/install.sh | bash

System registries

Oil resolves packages through existing distribution ecosystems (feature-gated):

FeatureRegistryExtractorSystems
system-aptDebian/Ubuntu repos.debDebian, Ubuntu, Mint, Pop, Kali, Parrot
system-dnfFedora/RHEL repos.rpmFedora, RHEL, CentOS, Rocky, Alma
system-zypperopenSUSE repos (via RPM metadata).rpmopenSUSE (Tumbleweed/Leap), SLES
system-pacmanArch repos.pkg.tar.zstArch, Manjaro, EndeavourOS, Garuda, Artix
system-apkAlpine/Chimera repos.apkAlpine, Chimera Linux
system-xbpsVoid repos.xbpsVoid Linux
system-nixNixpkgsNix storeNixOS
system-opkgOpenWrt Packages.gz.ipk (via deb extractor)OpenWrt, LEDE
system-eopkgSolus eopkg-index.xml.eopkgSolus
system-brewLinuxbrewBottlesmacOS, Linux
system-flatpak— (detect/search/list only)daemon-basedCross-distro
system-snap— (detect/search/list only)daemon-basedCross-distro
system-emerge— (detect/list only)source-basedGentoo
system-freebsd— (detect/list only)CLI passthroughFreeBSD
system-guix— (detect/list only)CLI passthroughGuix System
system-pkgadd— (detect/list only)CLI passthroughOpenBSD
system-swupd— (detect/list only)CLI passthroughClear Linux

Default builds include all registries (system-all). Compile with --no-default-features --features "system-xbps,system-apk" to select only what you need.