The lens package manager
One command for Arch repos, the AUR and Flatpak, with a news check and a snapshot before every update.
lens is the lensOS package manager. It’s written in Rust and built on libalpm, the library
pacman itself is built on. pacman is one frontend to that engine and lens is another: same
repositories, same mirrors, same signing keys, same package database. That means:
- packages come straight from the Arch mirrors, plus the lensOS repo
pacman(and AUR helpers like yay) keep working, and see everything lens installs- lens adds its own commands, output and safety checks on top
Commands
| command | what it does |
|---|---|
lens install <name> | installs from the Arch / lensOS repos, falls back to the AUR; Flatpak app IDs work too |
lens remove <name> | removes a package and dependencies nothing else needs |
lens update | Arch news check, Btrfs snapshot, then repo packages, AUR packages and Flatpaks |
lens search <term> | searches the repos, the AUR and Flathub together |
lens info <name> | details about a repo or AUR package |
lens list | what you installed (--all for everything, --aur for AUR packages) |
lens autoremove | removes dependencies nothing needs anymore |
lens clean | trims the download cache (keeps the two newest versions of installed packages) and offers to delete old systems left by rollbacks |
lens news | the latest Arch Linux news |
lens snapshots | snapshots lens has taken |
lens snapshot [label] | takes a snapshot now, e.g. lens snapshot before-nvidia |
lens rollback <snapshot> | puts the system back to a snapshot, after a restart |
lens undo | undoes the last update: back to the snapshot lens update took just before it |
lens channel stable / testing | switches the lensOS repo between [lensos] and [lensos-testing] |
Commands that change the system ask for your password through sudo. -y answers every question
with its default.
What happens on update
- news check: new posts on archlinux.org since your last update are shown first. Some updates need manual steps, and this is where Arch announces them.
- plan: every upgrade is listed with old and new versions, plus AUR updates.
- snapshot: on Btrfs (the installer’s default), a read-only snapshot of the system is taken. lens keeps the newest five.
- download, then install: packages are downloaded first (Ctrl+C is safe here), then installed (Ctrl+C is ignored so the system is never left half-updated).
- AUR and Flatpak: AUR packages are rebuilt, Flatpak apps updated.
Snapshots and rollback
If an update breaks something: lens undo, then restart. That goes back to the snapshot taken
just before the last update. For an older one: lens snapshots, then lens rollback <name>. You
can also pick a snapshot in the boot menu (Restore a snapshot) if the system doesn’t start.
Your home folder, logs and the package cache are separate and aren’t rolled back.
lens snapshot before-nvidia # take one by hand before trying something risky
lens install nvidia-open-dkms
lens rollback lens-2026-10-07_01-02-11-before-nvidia # changed your mind? restart afterwards Kernels live on the boot partition, outside the snapshot, so lens checks that every installed
kernel still has complete drivers in the snapshot and refuses the rollback if not. The system you
rolled back from is kept until lens clean removes it, so a rollback can itself be undone.
The AUR
AUR packages are made by the community and aren’t checked by Arch or lensOS. lens shows the PKGBUILD before building (you can read what it does), builds as your user (never as root), and installs the result like any other package.
Settings
/etc/lens/lens.conf:
channel = stable # or testing
lensos_repo = true # use the lensOS repo (skipped quietly while it's offline)
aur = true
flatpak = true
news = true # check Arch news before updating
snapshots = true # snapshot before updating
keep_snapshots = 5 Repositories, mirrors, ignored packages and so on stay in /etc/pacman.conf, shared with pacman.