summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/cmd/uninstall.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py
index f7fbd67754..37fe98d0d0 100644
--- a/lib/spack/spack/cmd/uninstall.py
+++ b/lib/spack/spack/cmd/uninstall.py
@@ -235,7 +235,7 @@ def do_uninstall(env, specs, force):
# If this spec is only used as a build dependency, we can uninstall
return all(
- dspec.deptypes == ("build",)
+ dspec.deptypes == ("build",) or not dspec.parent.installed
for dspec in record.spec.edges_from_dependents()
)