diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index ba3817bb5f9..fbd4ea8c5a4 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -263,7 +263,7 @@ def remove_url(url): if url.scheme == 's3': s3 = s3_util.create_s3_session(url) - s3.delete_object(Bucket=url.s3_bucket, Key=url.path) + s3.delete_object(Bucket=url.netloc, Key=url.path) return # Don't even try for other URL schemes.