% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hmrc_clear_cache.R
\name{hmrc_clear_cache}
\alias{hmrc_clear_cache}
\title{Clear the local HMRC data cache}
\usage{
hmrc_clear_cache(max_age_days = NULL)
}
\arguments{
\item{max_age_days}{Numeric or \code{NULL}. If \code{NULL} (default), every cached
file is removed. If a number, only files modified more than that many
days ago are removed.}
}
\value{
Invisibly returns the number of files deleted.
}
\description{
Deletes locally cached data files downloaded by the package. By default
all cached files are removed; pass \code{max_age_days} to remove only files
older than that.
}
\examples{
\donttest{
op <- options(hmrc.cache_dir = tempdir())
hmrc_clear_cache()
hmrc_clear_cache(max_age_days = 30)
options(op)
}

}
\seealso{
Other infrastructure: 
\code{\link{hmrc_cache_info}()},
\code{\link{hmrc_list_tax_heads}()},
\code{\link{hmrc_meta}()},
\code{\link{hmrc_publications}()},
\code{\link{hmrc_search}()}
}
\concept{infrastructure}
