Uses remove.packages() to uninstall the package. To uninstall a package
from a non-default library, use in combination with withr::with_libpaths().
uninstall(pkg = ".", unload = TRUE, quiet = FALSE, lib = .libPaths()[[1]])The package to use, can be a file path to the package or a
package object. See as.package() for more information.
if TRUE (the default), ensures the package is unloaded, prior
to uninstalling.
If TRUE, suppress output.
a character vector giving the library directories to remove the
packages from. If missing, defaults to the first element in
.libPaths().
with_debug() to install packages with debugging flags set.
Other package installation:
install()