R Package Installation from Remote Repositories, Including 'GitHub'

Download and install R packages stored in 'GitHub', 'BitBucket', or plain 'subversion' or 'git' repositories. This package is a lightweight replacement of the 'install_*' functions in 'devtools'. Indeed most of the code was copied over from 'devtools'.


Project Status: Active - The project has reached a stable, usable state and is being actively developed. Linux Build Status Windows Build status CRAN RStudio mirror downloads Coverage Status

Download and install R packages stored in GitHub, BitBucket, or plain subversion or git repositories. This package is a lightweight replacement of the install_* functions in devtools. Indeed most of the code was copied over from devtools.


  • Installers:
    • Install packages with their dependencies.
    • Install from GitHub, BitBucket.
    • Install from git and subversion repositories.
    • Install from local files or URLs.
    • Install the dependencies of a local package tree.
    • Install specific package versions from CRAN.
  • Supports BioConductor packages.
  • Supports the Remotes field in DESCRIPTION. See more here.
  • Supports the Additional_repositories in DESCRIPTION.
  • Supports the crancache package to transparently cache CRAN packages. See more here.
  • Can install itself from GitHub (see below).
  • Does not depend on other R packages.
  • Does not contain compiled code, so no compiler is needed.
  • Does not need any external software (for most of the functionality at least).


You can install remotes from GitHub. If you already have a previous version of remotes installed, you can use that to install the new version:


You can also call the supplied install-github.R file directly, from within R:


The https://install-github.me service is also based on remotes. You can use it to install any R package from GitHub via sourcing a URL. E.g. to install remotes itself:



Note that most of the examples here use GitHub. See below for other supported repository types.

To install the latest version of a package in the master branch from GitHub, you can use the user/repo form. Note that user can also be an organization:


If the R package is inside a subdirectory of the root directory, then give this subdirectory as well:


To install a certain branch or commit or tag, append it to the repo name, after an @:

remotes::install_github("gaborcsardi/[email protected]")

To install the latest release, append @*release to the repo name:

remotes::install_github("gaborcsardi/[email protected]*release")

To install a pull request, append # and the id (an integer number) of the pull request to the repo name:



Dependencies are automatically installed from CRAN. By default, outdated dependencies are automatically upgraded.

Dependencies on GitHub

It is also possible to install dependencies from GitHub or other supported repositories. For this you need to add a Remotes field to the DESCRIPTION file. Its format is:

Remotes: [remote::]repo_spec, [remote::]repo_spec, ...

where repo_spec is any repository specification install_github can handle. If remote:: is missing, github:: is assumed. Other possible values: bitbucket::, git::, local::, svn::, url::, version::.

See more about the Remotes field in this vignette.

Additional repositories

remotes supports the Additional_repositories field in DESCRIPTION. This is a way to specify dependencies from non-CRAN package repositories. See the Writing R extensions manual for details.

BioConductor packages

BioConductor packages are automatically detected and their dependencies are installed from BioConductor. The BiocInstaller package, which is needed to install them, is also automatically installed temporarily.

Currently supported remote types

  • GitHub repositories via install_github.
  • Bitbucket repositories via install_bitbucket.
  • Generic git repositories via install_git. They need either a system git installation, or the git2r R package.
  • Local directories or package archive files via install_local.
  • Remote package archive files via install_url.
  • Packages in subversion repositories via install_svn. They need a system subversion installation.
  • Specific package versions from CRAN or other CRAN-like repositories via install_version. This includes outdated and archived packages as well.
  • All dependencies of a package in a local directory via install_deps.

Download methods

  • For R older the 3.2, curl package is required as remotes fallbacks to curl::curl_download in that case
  • For R newer than 3.3, default download.file method is used. (method = "auto")
  • For in between versions,
    • method = "wininet" is used on windows OS
    • method = "libcurl" is used on other OS, if available.

See help("download.file") for informations on these methods and for setting proxies if needed.


If a package in a git repository has submodules, then the installation will likely fail. Nevertheless, a warning is given in this case.


GPL (>= 2) © Mango Solutions, RStudio



  • Accept HTTPS, SSH, or various browser URLs in GitHub repo specification, @jennybc, #90, #109, #112


  • URL encode GitHub references, to allow installing from non-alphanumeric branch or tags, @krlmlr #38

  • Better cooperation with proxy servers, and better download method selection on Windows, @cderv, #45, #46

  • install_deps() supports tar balls, #47

  • Allow training slash in GitHub repo specification, #54

  • Work around on some Linux systems, where unzip is set to the empty string, @HenrikBengtsson, #57

  • Check for circular dependencies while installing, #31

  • Updated BioConductor repo URLs for newer BioC versions


First public release.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.1.1 by Gábor Csárdi, 9 months ago


Report a bug at https://github.com/r-lib/remotes/issues

Browse source code at https://github.com/cran/remotes

Authors: Gábor Csárdi [aut, cre], Hadley Wickham [aut], Winston Chang [aut], Jim Hester [aut], RStudio [cph], Martin Morgan [aut], Dan Tenenbaum [aut], Mango Solutions [cph]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports methods, utils

Suggests curl, git2r, mockery, pingr, testthat, withr

System requirements: Subversion for install_svn, git for install_git

Imported by RInno, automagic, cyclocomp.

Suggested by BiocManager.

See at CRAN