中文文档 | English
Easily install a specific version of AUR packages — current, historical, or newer.
aurpick lets you browse complete Git history, preview PKGBUILDs, and pick the exact version you need.
- Complete History Browsing - View all Git commit history of the package
- Interactive Selection - Powerful search and filtering via fzf
- Version Information - Automatically parse PKGBUILD version from each commit
- Live Preview - View commit information and PKGBUILD content
- Official Package Redirect - Auto-detect official repo packages and invoke
downgrade - GitHub Mirror Support - Optional GitHub AUR mirror to reduce load on official AUR and avoid service disruptions
- No AUR Helper Required - Works independently using only git and makepkg
- Development Mode - Preserve temporary files for debugging
git- Clone AUR repositoriesfzf- Interactive selection interfacebase-devel- Build AUR packages (includesmakepkg)downgrade(optional) - Handle official repository packages
Install dependencies:
sudo pacman -S git fzf base-develBasic usage:
aurpick <package-name>Examples:
# Rollback yay after a problematic update
aurpick yay
# Use GitHub AUR mirror (read-only experimental mirror)
aurpick --github yay
# Development mode (preserve temporary files for debugging)
aurpick --dev yayUsing aurpick is pointless or will fail for at least the following types of packages:
-
VCS packages (
-git,-svn,-hg, etc.)- These packages use
pkgver()functions to dynamically fetch the latest upstream source code during build time - Even if you select a historical PKGBUILD, it will still build the current upstream version
- These packages use
-
Packages with version-agnostic download URLs
- Source URLs like
https://example.com/latest.tar.xzalways point to the newest file - Selecting historical PKGBUILDs won't fetch the corresponding historical source files
- Source URLs like
-
Packages with deleted upstream sources
- If upstream has removed old release files, downloads will fail with 404 errors
- The
--skipchecksumsflag can only skip verification, not solve missing files
- Clone the AUR Git repository for the specified package (from official AUR or GitHub mirror)
- Traverse all commit history and extract PKGBUILD version information
- Provide interactive selection interface via fzf
- Switch to the selected historical commit
- Build and install using
makepkg
--dev- Development mode, preserve temporary files in/tmp/aurpick-<package>--github- Use GitHub AUR mirror instead of official AUR source--version/-v- Show version information
- This tool focuses on AUR packages. Official repository packages will be redirected to the
downgradetool if available - Older versions may encounter checksum mismatches. You can skip verification if needed
For testing and development:
sudo pacman -S shellcheck python-cramshellcheck- Static analysis for shell scriptspython-cram- Command-line testing framework
Run the complete test suite:
bash test.shThis will:
- Run
shellcheckfor static code analysis - Run all
cramfunctional tests
Please ensure all tests pass before submitting code.
aurpick/
├── aurpick # Main executable script
├── test.sh # Test runner (shellcheck + cram)
├── test/ # Test cases (cram format)
│ ├── basic.t
│ ├── version.t
│ ├── dev-mode.t
│ └── ...
├── README.md # Documentation (English)
└── README.zh.md # Documentation (Chinese)
MIT License - See LICENSE