Morganamilo/paru · error
--downloadonly can't be used for AUR packages
Error message
--downloadonly can't be used for AUR packages
What it means
prepare_build rejects the --downloadonly (-w) flag when the resolved action set includes AUR packages to build. --downloadonly only downloads repository packages without installing; AUR packages must be built locally, so 'download only' is meaningless for them and paru bails instead of silently ignoring the flag.
Solutions
- Drop the -w/--downloadonly flag when the target is an AUR package
- Use `paru -G <pkg>` to fetch AUR PKGBUILDs/sources without building
- Split the operation: repo packages with -w, AUR packages without it
- Check whether your wrapper script unconditionally appends -w
Example fix
// before $ paru -Sw slack-desktop # AUR package + downloadonly // after $ paru -G slack-desktop # fetch without building, or $ paru -S slack-desktop # normal build/install
Defensive patterns
Strategy: validation
Validate before calling
if args.has_arg("w", "downloadonly") && targets.any(is_aur_pkg) {
eprintln!("--downloadonly is invalid for AUR targets; use paru -G instead");
std::process::exit(1);
} Prevention
- Only use -w with repository package targets
- Use `paru -G <pkg>` to fetch AUR sources without building
- Audit wrapper scripts for unconditional -w flags
When it happens
Trigger: Running e.g. `paru -Sw <aur-package>` (or `paru -S <aur-pkg> -w`) where split_repo_aur_targets assigns the target to the AUR, actions.build is non-empty, and config.args.has_arg("w", "downloadonly") is true.
Common situations: Users trying to pre-fetch an AUR package's sources with -w; scripts that always pass -w for dry-run-style downloads; confusion of -w with -Sp or `paru -G` (get pkgbuild) workflows.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- no targets specified (use -h for help)
- {}
- repository " " was not found
- no local repo named
- no local repos configured, add one to your pacman.conf: …
AI-assisted analysis of Morganamilo/paru@9ac3578807 (2026-09-12).
Data as JSON: /api/errors/f1aa1d71ef46f256.
Report an issue: GitHub.
Appendix: source
Thrown at src/install.rs:1080
return false;
}
if ran_pacman {
return false;
}
aur_targets.is_empty() && upgrades.aur_keep.is_empty() && upgrades.pkgbuild_keep.is_empty()
}
async fn prepare_build(
&mut self,
config: &Config,
cache: &Cache,
actions: &mut Actions<'_>,
) -> Result<()> {
if !actions.build.is_empty() && nix::unistd::getuid().is_root() {
bail!(tr!("can't install AUR package as root"));
}
if !actions.build.is_empty() && config.args.has_arg("w", "downloadonly") {
bail!(tr!("--downloadonly can't be used for AUR packages"));
}
let conflicts = check_actions(config, actions, self.install_targets)?;
self.conflicts = conflicts
.0
.iter()
.map(|c| c.pkg.clone())
.chain(conflicts.1.iter().map(|c| c.pkg.clone()))
.collect::<HashSet<_>>();
let c = config.color;
print_warnings(config, cache, Some(actions));
if actions.build.is_empty() && actions.install.is_empty() {
printtr!(" there is nothing to do");
return Ok(());View on GitHub (pinned to 9ac3578807)