# R: Remove Installed Packages

remove.packages {utils} | R Documentation

## Remove Installed Packages

### Description

Removes installed packages/bundles and updates index information as necessary.

### Usage

    remove.packages(pkgs, lib, version)

### Arguments

`pkgs` | a character vector with the names of the package(s) or bundle(s) to be removed.
`lib` | a character vector giving the library directories to remove the packages from. If missing, defaults to the first element in `.libPaths()`.
`version` | A character vector specifying version(s) with versioned installs of the package(s) to remove. If none is provided, the system will remove an unversioned install of the package if one is found, otherwise the latest versioned install.

### Details

If an element of `pkgs` matches a bundle name, all the packages in the bundle will be removed. This takes precedence over matching a package name.

`pkgs` and `version` will be recycled if necessary to the length of the longer one.

### See Also

`REMOVE` for a command line version; `install.packages` for installing packages.

[Package utils version 2.6.0 Index]