% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reload.R
\name{reload}
\alias{reload}
\title{Unload and reload package.}
\usage{
reload(pkg = ".", quiet = FALSE)
}
\arguments{
\item{pkg}{The package to use, can be a file path to the package or a
package object.  See \code{\link[=as.package]{as.package()}} for more information.}

\item{quiet}{if \code{TRUE} suppresses output from this function.}
}
\description{
This attempts to unload and reload an \emph{installed} package. If the package is
not loaded already, it does nothing. It's not always possible to cleanly
unload a package: see the caveats in \code{\link[=unload]{unload()}} for some of the potential
failure points. If in doubt, restart R and reload the package with
\code{\link[=library]{library()}}.
}
\examples{
\dontrun{
# Reload package that is in current directory
reload(".")

# Reload package that is in ./ggplot2/
reload("ggplot2/")

# Can use inst() to find the package path
# This will reload the installed ggplot2 package
reload(pkgload::inst("ggplot2"))
}
}
\seealso{
\code{\link[=load_all]{load_all()}} to load a package for interactive development.
}
