by r-lib

r-lib / pak

A fresh approach to package installation

227 Stars 18 Forks Last release: over 1 year ago (v0.1.2) 362 Commits 1 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


A Fresh Approach to R Package Installation

lifecycle CRAN RStudio mirror
downloads Codecov test
coverage R build
status <!-- badges: end -->

pak installs R packages from CRAN, Bioconductor, GitHub, and local files and directories. It is an alternative to

. pak is fast, safe and convenient.


Install the released version of the package from CRAN:


(After installation, you might also want to run

; it’ll be run automatically when needed but you might want to do it now to save some time later.)

Install the development version from our repository on GitHub:

install.packages("pak", repos = "")

This is currently supported for

  • macOS and R 3.3.x or later, including R-devel
  • Windows and R 3.3.x or later, including R-devel
  • Linux (any 64-bit distribution) and R 3.3.x or later, including R-devel



to install CRAN or Bioconductor packages:

To install GitHub packages, use the


All dependencies will be installed as well, to the same library.

Why pak?


  • Fast downloads and HTTP queries. pak performs all HTTP requests concurrently.

  • Fast installs. pak builds and installs packages concurrently.

  • Metadata and package cache. pak caches package metadata and all downloaded packages locally. It does not download the same package files over and over again.

  • Lazy installation. pak only installs the packages that are really necessary for the installation. If the requested package and its dependencies are already installed, pak does nothing.


  • Private library (pak’s own package dependencies do not affect your regular package libraries and vice versa).

  • Every pak operation runs in a sub-process, and the packages are loaded from the private library. pak avoids loading packages from your regular package libraries. (These package files would be locked on some systems, and locked packages cannot be updated. pak does not load any package in the main process, except for pak itself).

  • To avoid updating locked packages, pak warns and requests confirmation for loaded packages.

  • Dependency solver. pak makes sure that you end up in a consistent, working state of dependencies. It finds conflicts up front, before attempting installation.


  • BioC packages. pak supports Bioconductor packages out of the box. It uses the Bioconductor version that is appropriate for your R version.

  • GitHub packages. pak supports GitHub packages out of the box. It also supports the

    entry in
    files, so that GitHub dependencies of GitHub packages will also get installed. See e.g.
  • Package sizes. For CRAN packages pak shows the total sizes of packages it needs to download.


  • Support GitLab repositories
  • Support Bitbucket repositories
  • Support package URLs
  • Support system requirements
  • Support older CRAN package versions
  • Support older BioConductor package versions
  • Support GitHub pull requests
  • Support local CRAN mirrors
  • Support the
  • Support SVN repos


GPL-3 © RStudio

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.