{"record":{"id":"4577ddcf7d2e5af2","repo":"Morganamilo/paru","slug":"repository-was-not-found","errorCode":null,"errorMessage":"repository \"{}\" was not found","messagePattern":"repository \"(.+?)\" was not found","errorType":"console","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/sync.rs","lineNumber":69,"sourceCode":"    } else {\n        for &target in &args.targets {\n            if config.alpm.syncdbs().iter().any(|r| r.name() == target) && config.mode.repo() {\n                let mut args = args.clone();\n                args.targets.clear();\n                args.target(target);\n                if let Err(e) = exec::pacman(config, &args) {\n                    print_error(c.error, e);\n                    ret = 1;\n                }\n            } else if config.pkgbuild_repos.repo(target).is_some() && config.mode.pkgbuild() {\n                list_pkgbuilds(config, &config.pkgbuild_repos, target);\n            } else if target == config.aur_namespace() && config.mode.aur() {\n                if let Err(e) = list_aur(config).await {\n                    print_error(c.error, e);\n                    ret = 1;\n                }\n            } else {\n                print_error(c.error, anyhow!(\"repository \\\"{}\\\" was not found\", target));\n                ret = 1;\n            }\n        }\n    }\n\n    Ok(ret)\n}\n\npub fn list_pkgbuilds(config: &Config, repos: &PkgbuildRepos, repo: &str) {\n    let stdout = std::io::stdout();\n    let mut stdout = stdout.lock();\n\n    if let Some(repo) = repos.repo(repo) {\n        for pkg in repo.pkgs(config) {\n            for name in pkg.srcinfo.pkgnames() {\n                print_pkg(\n                    config,\n                    &mut stdout,","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/sync.rs#L51-L87","documentation":"In sync.rs's list command (paru's equivalent of `pacman -Sl`), a requested target is neither a known named repository, the AUR namespace (with aur mode enabled), nor a local repo. paru prints this error and returns exit code 1.","triggerScenarios":"Running `paru -Sl <target>` where <target> is not a configured repo name (core, extra, multilib, custom repos in pacman.conf) and not \"aur\" while AUR mode is on.","commonSituations":"Typo in repo name; querying a repo defined in an unused pacman.conf; passing \"aur\" while operating with --repo-only / AUR mode disabled; referencing a repo removed from pacman.conf.","solutions":["Check available repos with `pacman -Sl` or `grep Server /etc/pacman.conf` and correct the name.","If you meant the AUR, use `paru -Sl aur` and ensure AUR mode is enabled (not --repo-only).","If it's a custom repo, confirm it is declared in pacman.conf and the local database exists."],"exampleFix":"# before\nparu -Sl multilib-testing   # not found\n# after\nparu -Sl multilib\n# or for AUR\nparu -Sl aur","handlingStrategy":"validation","validationCode":"let repos: Vec<String> = pacman_conf_repos();\nlet target = \"myrepo\";\nassert!(target == \"aur\" || repos.iter().any(|r| r == target), \"repository {target} not found\");","typeGuard":null,"tryCatchPattern":"// CLI wrapper pattern\nmatch paru_list(target).await {\n    Ok(out) => println!(\"{out}\"),\n    Err(e) if e.to_string().contains(\"was not found\") => {\n        eprintln!(\"'{}' is not a repo; try: aur, core, extra, multilib\", target);\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["List valid repos with `pacman -Sl` before scripting.","Use `paru -Sl aur` with AUR mode enabled (avoid --repo-only).","Keep custom repos declared in /etc/pacman.conf up to date."],"tags":["cli","repository","pacman","aur"],"backgroundTag":"resource-not-found","analyzedSha":"9ac3578807a87858651e81a02586ceb947686e7c","analyzedAt":"2026-09-12T04:57:59.861Z","contentChangedAt":"2026-09-12T04:57:59.861Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}