{"record":{"id":"8b55cf573fd704b4","repo":"Morganamilo/paru","slug":"can-not-install-conflicting-packages-with-noconfirm","errorCode":null,"errorMessage":"can not install conflicting packages with --noconfirm","messagePattern":"can not install conflicting packages with --noconfirm","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/install.rs","lineNumber":1471,"sourceCode":"                    eprint!(\" ({})\", conflict);\n                }\n                eprint!(\"  \");\n            }\n            eprintln!();\n        }\n        eprintln!();\n    }\n\n    if (!conflicts.is_empty() || !inner_conflicts.is_empty()) && !config.use_ask {\n        eprintln!(\n            \"{} {}\",\n            c.warning.paint(\"::\"),\n            c.bold.paint(tr!(\n                \"Conflicting packages will have to be confirmed manually\"\n            ))\n        );\n        if config.no_confirm {\n            bail!(tr!(\"can not install conflicting packages with --noconfirm\"));\n        }\n    }\n\n    Ok((conflicts, inner_conflicts))\n}\n\nfn repo_install(\n    config: &Config,\n    install: &[RepoPackage],\n    conflicts: &HashSet<String>,\n) -> Result<i32> {\n    if install.is_empty() {\n        return Ok(0);\n    }\n\n    let mut deps = Vec::new();\n    let mut exp = Vec::new();\n","sourceCodeStart":1453,"sourceCodeEnd":1489,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/install.rs#L1453-L1489","documentation":"check_actions detects file or package conflicts within the planned transaction. Normally paru (like pacman) asks the user to confirm conflict resolution interactively (printing 'Conflicting packages will have to be confirmed manually'); when --noconfirm is set there is no way to answer, so it bails immediately instead of hanging or making unsafe default choices.","triggerScenarios":"Running e.g. `paru -S pkg1 pkg2 --noconfirm` where the planned install contains conflicting packages/files (conflicts/inner_conflicts non-empty) and config.no_confirm is true.","commonSituations":"CI/automation scripts using --noconfirm that pull in conflicting packages; installing a package that replaces/conflicts with an installed one; file conflicts between repo and AUR packages.","solutions":["Remove --noconfirm and run interactively to answer conflict prompts","Pre-resolve the conflict: remove the conflicting package first (`paru -R <conflicting-pkg> --noconfirm`)","Use `--ask 4` style pacman conflict handling via pacman flags if appropriate","Change your package set so no conflicts are present in one transaction"],"exampleFix":"// before\n$ paru -S newpkg --noconfirm   # conflicts with oldpkg\n// after\n$ paru -R oldpkg --noconfirm && paru -S newpkg --noconfirm","handlingStrategy":"validation","validationCode":"// dry-run first to detect conflicts before --noconfirm runs\nparu -S \"$PKGS\" --print-format '%n' >/dev/null || exit 1","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Dry-run transactions in CI before running with --noconfirm","Remove known conflicting packages in a separate step first","Keep package sets minimal per transaction"],"tags":["conflict","noconfirm","automation","pacman"],"backgroundTag":"conflicting-config-options","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"}