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 is_ready(dag_hash): # 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() )