bundles / astropy latest / astropy / utils / data / clear_download_cache
function
astropy.utils.data:clear_download_cache
source: /astropy/utils/data.py :1800
Signature
def clear_download_cache ( hashorurl = None , pkgname = astropy ) Summary
Clears the data file cache by deleting the local file(s).
Extended Summary
If a URL is provided, it will be the name used in the cache. The contents may have been downloaded from this URL or from a mirror or they may have been provided by the user. See ~download_file for details.
For the purposes of this function, a file can also be identified by a hash of its contents or by the filename under which the data is stored (as returned by ~download_file, for example).
Parameters
hashorurl: str or NoneIf None, the whole cache is cleared. Otherwise, specify a hash for the cached file that is supposed to be deleted, the full path to a file in the cache that should be deleted, or a URL that should be removed from the cache if present.
pkgname: `str`, optionalThe package name to use to locate the download cache. i.e. for
pkgname='astropy'the default cache location is~/.astropy/cache.
Aliases
-
astropy.utils.data.clear_download_cache