Please look at this before asking questions.
pak does not reinstall a package, if the same version is already installed.
Sometimes you still want a reinstall, e.g. to fix a broken installation.
In this case you can delete the package and then install it, or use the
?reinstall
parameter:
pak::pkg_install("tibble")
#> #> → Will install 13 packages. #> → All 13 packages (7.45 MB) are cached. #> + cli 3.3.0 #> + crayon 1.5.1 #> + ellipsis 0.3.2 #> + fansi 1.0.3 #> + glue 1.6.2 #> + lifecycle 1.0.1 #> + magrittr 2.0.3 #> + pillar 1.7.0 #> + pkgconfig 2.0.3 #> + rlang 1.0.2 #> + tibble 3.1.7 #> + utf8 1.2.2 #> + vctrs 0.4.1 #> ℹ No downloads are needed, 13 pkgs (7.45 MB) are cached #> ✔ Got ellipsis 0.3.2 (aarch64-apple-darwin20) (38.65 kB) #> ✔ Got lifecycle 1.0.1 (aarch64-apple-darwin20) (107.55 kB) #> ✔ Got crayon 1.5.1 (aarch64-apple-darwin20) (158.62 kB) #> ✔ Got glue 1.6.2 (aarch64-apple-darwin20) (154.64 kB) #> ✔ Got pkgconfig 2.0.3 (aarch64-apple-darwin20) (17.70 kB) #> ✔ Got utf8 1.2.2 (aarch64-apple-darwin20) (209.24 kB) #> ✔ Got magrittr 2.0.3 (aarch64-apple-darwin20) (231.25 kB) #> ✔ Got fansi 1.0.3 (aarch64-apple-darwin20) (379.23 kB) #> ✔ Got cli 3.3.0 (aarch64-apple-darwin20) (1.17 MB) #> ✔ Got pillar 1.7.0 (aarch64-apple-darwin20) (744.33 kB) #> ✔ Got tibble 3.1.7 (aarch64-apple-darwin20) (723.61 kB) #> ✔ Got vctrs 0.4.1 (aarch64-apple-darwin20) (1.76 MB) #> ✔ Got rlang 1.0.2 (aarch64-apple-darwin20) (1.79 MB) #> ✔ Installed cli 3.3.0 (66ms) #> ✔ Installed crayon 1.5.1 (75ms) #> ✔ Installed ellipsis 0.3.2 (85ms) #> ✔ Installed fansi 1.0.3 (109ms) #> ✔ Installed glue 1.6.2 (117ms) #> ✔ Installed lifecycle 1.0.1 (126ms) #> ✔ Installed magrittr 2.0.3 (133ms) #> ✔ Installed pillar 1.7.0 (151ms) #> ✔ Installed pkgconfig 2.0.3 (36ms) #> ✔ Installed rlang 1.0.2 (56ms) #> ✔ Installed tibble 3.1.7 (40ms) #> ✔ Installed utf8 1.2.2 (38ms) #> ✔ Installed vctrs 0.4.1 (28ms) #> ✔ 1 pkg + 12 deps: added 13, dld 13 (7.48 MB) [4.7s]
pak::pkg_install("tibble?reinstall")
#> #> → Will install 1 package. #> → The package (724.32 kB) is cached. #> + tibble 3.1.7 #> ℹ No downloads are needed, 1 pkg (724.32 kB) is cached #> ✔ Installed tibble 3.1.7 (27ms) #> ✔ 1 pkg + 12 deps: kept 11, added 1 [746ms]
To force the installation of a source package (instead of a binary
package), use the ?source
parameter:
pak::pkg_install("tibble?source")
#> #> → Will install 1 package. #> → The package (672.34 kB) is cached. #> + tibble 3.1.7
You cannot currently, but keep on eye on this issue: https://github.com/r-lib/pak/issues/343