title: How can I delete cached downloaded objects (e.g. from http_archive) in Bazel?
body: <p>The CI build for my Bazel C++ project recently broke. The error indicates that the HTTPS download for a <code>http_repository</code> failed:</p>
  <pre><code>INFO: Repository eigen instantiated at:
    no stack (--record_rule_instantiation_callstack not enabled)
  Repository rule http_archive defined at:
    /private/var/tmp/_bazel_kstaley/efca2582089f638162aa9f6ccfe4282e/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in &lt;toplevel&gt;
  WARNING: Download from https://gitlab.com/libeigen/eigen/-/archive/56b3e3f3f8ca9972ca390c8296fde363bdab271c/eigen-56b3e3f3f8ca9972ca390c8296fde363bdab271c.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 406 Not Acceptable
  ERROR: An error occurred during the fetch of repository 'eigen':
     java.io.IOException: Error downloading [https://gitlab.com/libeigen/eigen/-/archive/56b3e3f3f8ca9972ca390c8296fde363bdab271c/eigen-56b3e3f3f8ca9972ca390c8296fde363bdab271c.tar.gz] to /private/var/tmp/_bazel_kstaley/efca2582089f638162aa9f6ccfe4282e/external/eigen/eigen-56b3e3f3f8ca9972ca390c8296fde363bdab271c.tar.gz: GET returned 406 Not Acceptable
  ERROR: /Users/kstaley/src/myrepo/library/utilities/BUILD:58:11: //library/utilities:mylibrary depends on @eigen//:eigen in repository @eigen which failed to fetch. no such package '@eigen//': java.io.IOException: Error downloading [https://gitlab.com/libeigen/eigen/-/archive/56b3e3f3f8ca9972ca390c8296fde363bdab271c/eigen-56b3e3f3f8ca9972ca390c8296fde363bdab271c.tar.gz] to /private/var/tmp/_bazel_kstaley/efca2582089f638162aa9f6ccfe4282e/external/eigen/eigen-56b3e3f3f8ca9972ca390c8296fde363bdab271c.tar.gz: GET returned 406 Not Acceptable
  ERROR: Analysis of target '//library/mypackage:mybinary' failed; build aborted: Analysis failed
  </code></pre>
  <p>I would like to reproduce this error locally, but I already have that file cached locally (the download error seems to be intermittent), so my local build succeeds.</p>
  <p>How can I delete Bazel's cached copy of the <code>.tar.gz</code> file so that I can test whether the download succeeds locally? I've tried <code>bazel clean --expunge</code> but it does not seem to delete downloaded artifacts.</p>