remove.packages
Remove Installed Packages

Description

Removes the specified package(s) from the library.

Usage

remove.packages(pkgs, lib = NULL)

Arguments

pkgs a character vector. Specifies the name(s) of the packages to remove.
lib a character string. Specifies the location of the package(s). If it is missing NULL, the first element of .libPaths() is used.

Details

If the package was loaded via a previous call to library, then the package is currently being used until it is unloaded. You must unload a package before you can remove it.
Value
returns invisible NULL.
Warning
Use this function with caution. Removing a package deletes it from the library (by default the directory TERR_HOME/library).
Differences Between TIBCO Enterprise Runtime for R and Open-Source R
See Also
package_version, installed.packages, available.packages, install.packages
Examples
install.packages("rpart")
library("rpart")
search()
# [1] ".GlobalEnv"        "package:rpart"     "package:stats"
# [4] "package:graphics"  "package:grDevices" "package:utils"
# [7] "package:datasets"  "package:methods"   "package:base"
detach(2, unload = TRUE)
remove.packages("rpart")
library("rpart")
# Error in library("rpart") : there is no package called 'rpart'
Package utils version 6.0.0-69
Package Index