rstudio / renv

renv: Project environments for R.
https://rstudio.github.io/renv/
MIT License
980 stars 153 forks source link

renv update trying to update removed packages #1081

Closed andrewelamb closed 1 year ago

andrewelamb commented 1 year ago

I'm trying to remove a package "projectlive.modules" from my project, but when I try to use renv::update it try to install it. I think I've removed every trace of it from my project so I'm not sure why this is ocuring.

Link to repo

> renv::update()
* Checking for updated packages ... Done!
The following package(s) will be updated:

# CRAN ===============================
- DT                    [0.21 -> 0.25]
- MASS                  [7.3-56 -> 7.3-58.1]
- Matrix                [1.4-1 -> 1.5-1]
- RColorBrewer          [1.1-2 -> 1.1-3]
- Rcpp                  [1.0.8.3 -> 1.0.9]
- bslib                 [0.3.1 -> 0.4.0]
- callr                 [3.7.0 -> 3.7.2]
- cli                   [3.2.0 -> 3.4.0]
- crayon                [1.5.0 -> 1.5.1]
- desc                  [1.4.1 -> 1.4.2]
- devtools              [2.4.3 -> 2.4.4]
- evaluate              [0.15 -> 0.16]
- fansi                 [1.0.2 -> 1.0.3]
- farver                [2.1.0 -> 2.1.1]
- fontawesome           [0.2.2 -> 0.3.0]
- forcats               [0.5.1 -> 0.5.2]
- generics              [0.1.2 -> 0.1.3]
- gert                  [1.5.0 -> 1.8.0]
- ggplot2               [3.3.5 -> 3.3.6]
- gh                    [1.3.0 -> 1.3.1]
- gitcreds              [0.1.1 -> 0.1.2]
- gtable                [0.3.0 -> 0.3.1]
- hms                   [1.1.1 -> 1.1.2]
- htmltools             [0.5.2 -> 0.5.3]
- httpuv                [1.6.5 -> 1.6.6]
- httr                  [1.4.2 -> 1.4.4]
- knitr                 [1.37 -> 1.40]
- lifecycle             [1.0.1 -> 1.0.2]
- mgcv                  [1.8-39 -> 1.8-40]
- nlme                  [3.1-155 -> 3.1-159]
- openssl               [2.0.0 -> 2.0.3]
- packrat               [repo: RSPM -> CRAN; ver: 0.7.0 -> 0.8.1]
- pillar                [1.7.0 -> 1.8.1]
- pkgload               [1.2.4 -> 1.3.0]
- processx              [3.5.2 -> 3.7.0]
- ps                    [1.6.0 -> 1.7.1]
- rmarkdown             [repo: RSPM -> CRAN; ver: 2.13 -> 2.16]
- roxygen2              [7.1.2 -> 7.2.1]
- rprojroot             [2.0.2 -> 2.0.3]
- rsconnect             [repo: RSPM -> CRAN; ver: 0.8.25 -> 0.8.27]
- rstudioapi            [0.13 -> 0.14]
- rversions             [2.1.1 -> 2.1.2]
- rvest                 [1.0.2 -> 1.0.3]
- sass                  [0.4.0 -> 0.4.2]
- scales                [1.1.1 -> 1.2.1]
- spatial               [7.3-11 -> 7.3-15]
- stringi               [1.7.6 -> 1.7.8]
- testthat              [3.1.2 -> 3.1.4]
- tinytex               [0.37 -> 0.41]
- tzdb                  [0.2.0 -> 0.3.0]
- usethis               [2.1.5 -> 2.1.6]
- viridisLite           [0.4.0 -> 0.4.1]
- webshot               [0.5.2 -> 0.5.3]
- xfun                  [0.30 -> 0.33]
- zip                   [2.2.0 -> 2.2.1]

# GitHub =============================
- projectlive.modules   [* -> Sage-Bionetworks/projectliveModules@main]
kevinushey commented 1 year ago

Presumedly, this is because the projectlive.modules package is still installed in your project library -- can you share the output of renv::diagnostics()?

andrewelamb commented 1 year ago

Yep!

renv::diagnostics()
Diagnostics Report [renv 0.15.5]
================================

# Session Info =======================
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
[1] testthat_3.1.4 devtools_2.4.4 usethis_2.1.6 

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9        compiler_4.2.1    later_1.3.0       urlchecker_1.0.1 
 [5] prettyunits_1.1.1 profvis_0.3.7     remotes_2.4.2     tools_4.2.1      
 [9] digest_0.6.29     pkgbuild_1.3.1    pkgload_1.3.0     memoise_2.0.1    
[13] lifecycle_1.0.2   rlang_1.0.5       shiny_1.7.2       cli_3.4.0        
[17] rstudioapi_0.14   fastmap_1.1.0     stringr_1.4.1     fs_1.5.2         
[21] htmlwidgets_1.5.4 glue_1.6.2        R6_2.5.1          processx_3.7.0   
[25] sessioninfo_1.2.2 callr_3.7.2       purrr_0.3.4       magrittr_2.0.3   
[29] ps_1.7.1          promises_1.2.0.1  ellipsis_0.3.2    htmltools_0.5.3  
[33] mime_0.12         xtable_1.8-4      renv_0.15.5       httpuv_1.6.6     
[37] stringi_1.7.8     miniUI_0.1.1.1    cachem_1.0.6      crayon_1.5.1     
[41] brio_1.1.3       

# Project ============================
Project path: "~/repos/shiny-module-gallery"

# Status =============================
* The project is already synchronized with the lockfile.

# Packages ===========================
                     Library Source Lockfile Source Path Dependency
DT                      0.25   CRAN     <NA>   <NA>  [1]       <NA>
KernSmooth           2.23-20   CRAN     <NA>   <NA>  [2]       <NA>
MASS                7.3-58.1   CRAN 7.3-58.1   CRAN  [1]   indirect
Matrix                 1.5-1   CRAN    1.5-1   CRAN  [1]   indirect
R6                     2.5.1   CRAN    2.5.1   CRAN  [1]   indirect
RColorBrewer           1.1-3   CRAN    1.1-3   CRAN  [1]   indirect
Rcpp                   1.0.9   CRAN    1.0.9   CRAN  [1]   indirect
RcppTOML               0.1.7   CRAN    0.1.7   CRAN  [1]   indirect
askpass                  1.1   CRAN      1.1   CRAN  [1]   indirect
assertthat             0.2.1   CRAN    0.2.1   CRAN  [1]   indirect
base64enc              0.1-3   CRAN    0.1-3   CRAN  [1]   indirect
bit                    4.0.4   CRAN    4.0.4   CRAN  [1]   indirect
bit64                  4.0.5   CRAN    4.0.5   CRAN  [1]   indirect
boot                  1.3-28   CRAN     <NA>   <NA>  [2]       <NA>
brew                   1.0-7   CRAN    1.0-7   CRAN  [1]   indirect
brio                   1.1.3   CRAN    1.1.3   CRAN  [1]   indirect
bslib                  0.4.0   CRAN    0.4.0   CRAN  [1]   indirect
cachem                 1.0.6   CRAN    1.0.6   CRAN  [1]   indirect
callr                  3.7.2   CRAN    3.7.2   CRAN  [1]   indirect
class                 7.3-20   CRAN     <NA>   <NA>  [2]       <NA>
cli                    3.4.0   CRAN    3.4.0   CRAN  [1]   indirect
clipr                  0.8.0   CRAN    0.8.0   CRAN  [1]   indirect
cluster                2.1.4   CRAN     <NA>   <NA>  [2]       <NA>
codetools             0.2-18   CRAN     <NA>   <NA>  [2]       <NA>
colorspace             2.0-3   CRAN    2.0-3   CRAN  [1]   indirect
commonmark             1.8.0   CRAN    1.8.0   CRAN  [1]   indirect
cpp11                  0.4.2   CRAN    0.4.2   CRAN  [1]   indirect
crayon                 1.5.1   CRAN    1.5.1   CRAN  [1]   indirect
credentials            1.3.2   CRAN    1.3.2   CRAN  [1]   indirect
crosstalk              1.2.0   CRAN    1.2.0   CRAN  [1]   indirect
curl                   4.3.2   CRAN    4.3.2   CRAN  [1]   indirect
data.table            1.14.2   CRAN   1.14.2   CRAN  [1]   indirect
desc                   1.4.2   CRAN    1.4.2   CRAN  [1]   indirect
devtools               2.4.4   CRAN    2.4.4   CRAN  [1]     direct
diffobj                0.3.5   CRAN    0.3.5   CRAN  [1]   indirect
digest                0.6.29   CRAN   0.6.29   CRAN  [1]   indirect
downlit                0.4.2   CRAN    0.4.2   CRAN  [1]   indirect
dplyr                 1.0.10   CRAN   1.0.10   CRAN  [1]     direct
ellipsis               0.3.2   CRAN    0.3.2   CRAN  [1]   indirect
evaluate                0.16   CRAN     0.16   CRAN  [1]   indirect
fansi                  1.0.3   CRAN    1.0.3   CRAN  [1]   indirect
farver                 2.1.1   CRAN    2.1.1   CRAN  [1]   indirect
fastmap                1.1.0   CRAN    1.1.0   CRAN  [1]   indirect
fontawesome            0.3.0   CRAN    0.3.0   CRAN  [1]   indirect
forcats                0.5.2   CRAN     <NA>   <NA>  [1]       <NA>
foreign               0.8-82   CRAN     <NA>   <NA>  [2]       <NA>
fs                     1.5.2   CRAN    1.5.2   CRAN  [1]   indirect
gbRd                  0.4-11   CRAN   0.4-11   CRAN  [1]     direct
generics               0.1.3   CRAN    0.1.3   CRAN  [1]   indirect
gert                   1.8.0   CRAN    1.8.0   CRAN  [1]   indirect
ggplot2                3.3.6   CRAN    3.3.6   CRAN  [1]   indirect
gh                     1.3.1   CRAN    1.3.1   CRAN  [1]   indirect
gitcreds               0.1.2   CRAN    0.1.2   CRAN  [1]   indirect
glue                   1.6.2   CRAN    1.6.2   CRAN  [1]   indirect
grDevices               <NA>   <NA>     <NA>   <NA>  [2]   indirect
graphics                <NA>   <NA>     <NA>   <NA>  [2]   indirect
grid                    <NA>   <NA>     <NA>   <NA>  [2]   indirect
gridExtra                2.3   CRAN      2.3   CRAN  [1]   indirect
gtable                 0.3.1   CRAN    0.3.1   CRAN  [1]   indirect
here                   1.0.1   CRAN    1.0.1   CRAN  [1]   indirect
highr                    0.9   CRAN      0.9   CRAN  [1]   indirect
hms                    1.1.2   CRAN    1.1.2   CRAN  [1]   indirect
htmltools              0.5.3   CRAN    0.5.3   CRAN  [1]   indirect
htmlwidgets            1.5.4   CRAN    1.5.4   CRAN  [1]   indirect
httpuv                 1.6.6   CRAN    1.6.6   CRAN  [1]   indirect
httr                   1.4.4   CRAN    1.4.4   CRAN  [1]   indirect
iatlas.modules         0.9.0 GitHub    0.9.0 GitHub  [1]     direct
ini                    0.3.1   CRAN    0.3.1   CRAN  [1]   indirect
isoband                0.2.5   CRAN    0.2.5   CRAN  [1]   indirect
jquerylib              0.1.4   CRAN    0.1.4   CRAN  [1]   indirect
jsonlite               1.8.0   CRAN    1.8.0   CRAN  [1]   indirect
kableExtra             1.3.4   CRAN     <NA>   <NA>  [1]       <NA>
knitr                   1.40   CRAN     1.40   CRAN  [1]   indirect
labeling               0.4.2   CRAN    0.4.2   CRAN  [1]   indirect
later                  1.3.0   CRAN    1.3.0   CRAN  [1]   indirect
lattice              0.20-45   CRAN  0.20-45   CRAN  [1]   indirect
lazyeval               0.2.2   CRAN    0.2.2   CRAN  [1]   indirect
lifecycle              1.0.2   CRAN    1.0.2   CRAN  [1]   indirect
lubridate              1.8.0   CRAN     <NA>   <NA>  [1]       <NA>
magrittr               2.0.3   CRAN    2.0.3   CRAN  [1]     direct
markdown                 1.1   CRAN      1.1   CRAN  [1]     direct
memoise                2.0.1   CRAN    2.0.1   CRAN  [1]   indirect
methods                 <NA>   <NA>     <NA>   <NA>  [2]   indirect
mgcv                  1.8-40   CRAN   1.8-40   CRAN  [1]   indirect
mime                    0.12   CRAN     0.12   CRAN  [1]   indirect
miniUI               0.1.1.1   CRAN  0.1.1.1   CRAN  [1]   indirect
munsell                0.5.0   CRAN    0.5.0   CRAN  [1]   indirect
nlme                 3.1-159   CRAN  3.1-159   CRAN  [1]   indirect
nnet                  7.3-17   CRAN     <NA>   <NA>  [2]       <NA>
openssl                2.0.3   CRAN    2.0.3   CRAN  [1]   indirect
packrat                0.8.1   CRAN    0.8.1   CRAN  [1]   indirect
pillar                 1.8.1   CRAN    1.8.1   CRAN  [1]   indirect
pkgbuild               1.3.1   CRAN    1.3.1   CRAN  [1]   indirect
pkgcond                0.1.1   CRAN    0.1.1   CRAN  [1]   indirect
pkgconfig              2.0.3   CRAN    2.0.3   CRAN  [1]   indirect
pkgdown                2.0.6   CRAN    2.0.6   CRAN  [1]   indirect
pkgload                1.3.0   CRAN    1.3.0   CRAN  [1]   indirect
plotly                4.10.0   CRAN   4.10.0   CRAN  [1]     direct
png                    0.1-7   CRAN    0.1-7   CRAN  [1]   indirect
praise                 1.0.0   CRAN    1.0.0   CRAN  [1]   indirect
prettyunits            1.1.1   CRAN    1.1.1   CRAN  [1]   indirect
processx               3.7.0   CRAN    3.7.0   CRAN  [1]   indirect
profvis                0.3.7   CRAN    0.3.7   CRAN  [1]   indirect
progress               1.2.2   CRAN    1.2.2   CRAN  [1]   indirect
projectlive.modules   0.11.0 GitHub     <NA>   <NA>  [1]       <NA>
projectliveModules     0.8.0 GitHub     <NA>   <NA>  [1]       <NA>
promises             1.2.0.1   CRAN  1.2.0.1   CRAN  [1]   indirect
ps                     1.7.1   CRAN    1.7.1   CRAN  [1]   indirect
purrr                  0.3.4   CRAN    0.3.4   CRAN  [1]     direct
ragg                   1.2.2   CRAN    1.2.2   CRAN  [1]   indirect
rappdirs               0.3.3   CRAN    0.3.3   CRAN  [1]   indirect
rcmdcheck              1.4.0   CRAN    1.4.0   CRAN  [1]   indirect
readr                  2.1.2   CRAN    2.1.2   CRAN  [1]     direct
rematch2               2.1.2   CRAN    2.1.2   CRAN  [1]   indirect
remotes                2.4.2   CRAN    2.4.2   CRAN  [1]   indirect
renv                  0.15.5   CRAN   0.15.5   CRAN  [1]     direct
reticulate              1.26   CRAN     1.26   CRAN  [1]     direct
rlang                  1.0.5   CRAN    1.0.5   CRAN  [1]     direct
rmarkdown               2.16   CRAN     2.16   CRAN  [1]   indirect
roxygen2               7.2.1   CRAN    7.2.1   CRAN  [1]     direct
rpart                 4.1.16   CRAN     <NA>   <NA>  [2]       <NA>
rprojroot              2.0.3   CRAN    2.0.3   CRAN  [1]   indirect
rsconnect             0.8.27   CRAN   0.8.27   CRAN  [1]     direct
rstudioapi              0.14   CRAN     0.14   CRAN  [1]   indirect
rversions              2.1.2   CRAN    2.1.2   CRAN  [1]   indirect
rvest                  1.0.3   CRAN     <NA>   <NA>  [1]       <NA>
sass                   0.4.2   CRAN    0.4.2   CRAN  [1]   indirect
scales                 1.2.1   CRAN    1.2.1   CRAN  [1]   indirect
selectr                0.4-2   CRAN     <NA>   <NA>  [1]       <NA>
sessioninfo            1.2.2   CRAN    1.2.2   CRAN  [1]   indirect
shiny                  1.7.2   CRAN    1.7.2   CRAN  [1]     direct
shinycssloaders        1.0.0   CRAN    1.0.0   CRAN  [1]   indirect
shinydashboard         0.7.2   CRAN    0.7.2   CRAN  [1]     direct
sourcetools            0.1.7   CRAN    0.1.7   CRAN  [1]   indirect
spatial               7.3-15   CRAN     <NA>   <NA>  [1]       <NA>
splines                 <NA>   <NA>     <NA>   <NA>  [2]   indirect
stats                   <NA>   <NA>     <NA>   <NA>  [2]     direct
stringi                1.7.8   CRAN    1.7.8   CRAN  [1]   indirect
stringr                1.4.1   CRAN    1.4.1   CRAN  [1]     direct
survival               3.4-0   CRAN     <NA>   <NA>  [2]       <NA>
svglite                2.1.0   CRAN     <NA>   <NA>  [1]       <NA>
sys                      3.4   CRAN      3.4   CRAN  [1]   indirect
systemfonts            1.0.4   CRAN    1.0.4   CRAN  [1]   indirect
testthat               3.1.4   CRAN    3.1.4   CRAN  [1]     direct
textshaping            0.3.6   CRAN    0.3.6   CRAN  [1]   indirect
tibble                 3.1.8   CRAN    3.1.8   CRAN  [1]     direct
tidyr                  1.2.1   CRAN    1.2.1   CRAN  [1]     direct
tidyselect             1.1.2   CRAN    1.1.2   CRAN  [1]     direct
tinytex                 0.41   CRAN     0.41   CRAN  [1]   indirect
tools                   <NA>   <NA>     <NA>   <NA>  [2]     direct
tzdb                   0.3.0   CRAN    0.3.0   CRAN  [1]   indirect
urlchecker             1.0.1   CRAN    1.0.1   CRAN  [1]   indirect
usethis                2.1.6   CRAN    2.1.6   CRAN  [1]     direct
utf8                   1.2.2   CRAN    1.2.2   CRAN  [1]   indirect
utils                   <NA>   <NA>     <NA>   <NA>  [2]     direct
vctrs                  0.4.1   CRAN    0.4.1   CRAN  [1]   indirect
viridis                0.6.2   CRAN    0.6.2   CRAN  [1]   indirect
viridisLite            0.4.1   CRAN    0.4.1   CRAN  [1]   indirect
vroom                  1.5.7   CRAN    1.5.7   CRAN  [1]   indirect
waiter                 0.2.5   CRAN     <NA>   <NA>  [1]       <NA>
waldo                  0.4.0   CRAN    0.4.0   CRAN  [1]   indirect
webshot                0.5.3   CRAN     <NA>   <NA>  [1]       <NA>
whisker                  0.4   CRAN      0.4   CRAN  [1]   indirect
withr                  2.5.0   CRAN    2.5.0   CRAN  [1]   indirect
xfun                    0.33   CRAN     0.33   CRAN  [1]   indirect
xml2                   1.3.3   CRAN    1.3.3   CRAN  [1]   indirect
 [ reached 'max' / getOption("max.print") -- omitted 4 rows ]

[1]: /home/alamb/.cache/R/renv/library/shiny-module-gallery-5316009c/R-4.2/x86_64-pc-linux-gnu
[2]: /usr/lib/R/library                                                                       

# ABI ================================
* No ABI conflicts were detected in the set of installed packages.

# User Profile =======================
[no user profile detected]

# Settings ===========================
List of 10
 $ bioconductor.version     : chr(0) 
 $ external.libraries       : chr(0) 
 $ ignored.packages         : chr(0) 
 $ package.dependency.fields: chr [1:3] "Imports" "Depends" "LinkingTo"
 $ r.version                : chr(0) 
 $ snapshot.type            : chr "implicit"
 $ use.cache                : logi TRUE
 $ vcs.ignore.cellar        : logi TRUE
 $ vcs.ignore.library       : logi TRUE
 $ vcs.ignore.local         : logi TRUE

# Options ============================
List of 9
 $ defaultPackages                     : chr [1:6] "datasets" "utils" "grDevices" "graphics" ...
 $ download.file.method                : chr "libcurl"
 $ download.file.extra                 : NULL
 $ install.packages.compile.from.source: NULL
 $ pkgType                             : chr "source"
 $ repos                               : Named chr "https://cloud.r-project.org"
  ..- attr(*, "names")= chr "CRAN"
 $ renv.consent                        : logi TRUE
 $ renv.project.path                   : chr "/home/alamb/repos/shiny-module-gallery"
 $ renv.verbose                        : logi TRUE

# Environment Variables ==============
HOME                        = /home/alamb
LANG                        = en_US.UTF-8
MAKE                        = make
R_LIBS                      = <NA>
R_LIBS_SITE                 = /usr/local/lib/R/site-library/:/usr/lib/R/site-library:/usr/lib/R/library
R_LIBS_USER                 = /home/alamb/.cache/R/renv/library/shiny-module-gallery-5316009c/R-4.2/x86_64-pc-linux-gnu:/usr/lib/R/library
RENV_DEFAULT_R_ENVIRON      = <NA>
RENV_DEFAULT_R_ENVIRON_USER = <NA>
RENV_DEFAULT_R_LIBS         = <NA>
RENV_DEFAULT_R_LIBS_SITE    = /usr/local/lib/R/site-library/:/usr/lib/R/site-library:/usr/lib/R/library
RENV_DEFAULT_R_LIBS_USER    = /home/alamb/R/x86_64-pc-linux-gnu-library/4.2
RENV_DEFAULT_R_PROFILE      = <NA>
RENV_DEFAULT_R_PROFILE_USER = <NA>
RENV_PROJECT                = /home/alamb/repos/shiny-module-gallery

# PATH ===============================
- /home/alamb/.poetry/bin
- /home/alamb/.local/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
- /snap/bin
- /usr/lib/rstudio/bin/postback

# Cache ==============================
There are a total of 515 package(s) installed in the renv cache.
Cache path: "~/.cache/R/renv/cache/v5/R-4.2/x86_64-pc-linux-gnu"
kevinushey commented 1 year ago

The package shows up in the diagnostic output:

projectlive.modules   0.11.0 GitHub     <NA>   <NA>  [1]       <NA>
projectliveModules     0.8.0 GitHub     <NA>   <NA>  [1]       <NA>

Are they still installed in the project library? Can you remove them with e.g.

renv::remove("projectlive.modules")
renv::remove("projectliveModules")
andrewelamb commented 1 year ago

@kevinushey Thanks! This is all new to me. I assumed that if it wasn't in the lockfile, or appear in renv::dependencies() it was gone from the project.

andrewelamb commented 1 year ago

Is there an easy way to essentially do renv::remove on all the pakcages that have an NA in the dependency column from renv::diagnostics()?

kevinushey commented 1 year ago

One option (if you want to synchronize your library with the lockfile, including removing unused packages) you could use renv::restore(clean = TRUE).