Re: issue with update.packages(), library 'utils'
Jeff Newmiller via R-help <[email protected]> Mon, 08 Jun 2026 06:26:52 -0700
| Newsgroups | gmane.comp.lang.r.general |
|---|---|
| Message-ID | <[email protected]> |
OP should also beware that on Windows it is common to install only binary p= ackages for speed, and it is just as common for the appearance of binary pa= ckages to lag behind source packages on any given repo. Ergo, you can get a= different update experience if you have Rtools installed AND you ask for i= nstallation from source vs. the faster install from binary. = The more dependencies you typically resolve in your library the more amplif= ied this problem gets. IMO the best approach for sanity is to track the ver= sions you have installed and restore them in a project-specific-library if = you need bit-for-but reproducibility and just upgrade between projects or w= hen you know that some fault exists that is affecting your results for a kn= own reason. Don't upgrade packages just because upgrade.packages says there= are new packages every day... that way leads to obsessive-compulsive disor= der (OCD). On June 8, 2026 5:01:26 AM PDT, Duncan Murdoch <[email protected]> w= rote: >I think what needs to happen here is that someone who is experiencing this= needs to debug it. It sounds as though old.packages() is identifying pack= ages that you think don't need replacing. You need to figure out why this = is happening. > >A guess: > > - Your .libPaths() vector (which is used as the default for lib.loc) cont= ains two or more library paths. You have old packages in one of those path= s, and when you install new ones, they go into the other path. > >You can diagnose this as follows: > > 1. Print .libPaths(). How many entries does it have? > 2. If it has two (or more) entries, run the following: > > lp <- .libPaths() > both <- intersect(list.files(lp[1]), list.files(lp[2])) > print(both) > > (If you have more than two entries, do this for all pairs.) > > This will list all the packages that you have installed in both place= s. On my system, the first entry is my user library, the second is the sys= tem library. You generally need admin permissions to modify the system lib= rary, so if you sometimes run with admin permissions and sometimes don't, y= ou can end up with different versions in those two places. > >3. To find out if you have different versions, run packageVersion(pkgnam= e, lp[1]) and compare to packageVersion(pkgname, lp[2]). For example, I se= e that I have "bslib" installed in both places, and I see > > > packageVersion("bslib", lp[1]) > [1] =E2=80=980.11.0=E2=80=99 > > packageVersion("bslib", lp[2]) > [1] =E2=80=980.10.0=E2=80=99 > >So it looks as though my system library has an obsolete version installed.= I should delete it. > >Duncan Murdoch > > > > >On 2026-06-08 7:40 a.m., Paulo Barata wrote: >> To the R-Help list, >> = >> I have also the same problem here. Most often when I attempt to update m= y packages, it seems that most of them, maybe all of them, are flagged as n= eeding update, even when they were updated just the previous day. >> = >> I do not use RStudio, I only use R directly. Currently, I am using R ver= sion 4.6.0 Patched (2026-05-29 r90087 ucrt), on Windows 10 Professional. >> = >> Paulo Barata >> = >> Rio de Janeiro - Brazil >> = >> ------------------------------------------------- >> = >>> = >>> Message: 1 >>> Date: Sun, 7 Jun 2026 16:30:34 +0200 >>> From: Karl Schilling <[email protected]> >>> To: [email protected] >>> Subject: Re: [R] issue with update.packages(), library 'utils' >>> Message-ID: <[email protected]> >>> Content-Type: text/plain; charset=3D"utf-8"; Format=3D"flowed" >>> = >>> I have exactly the same problem as reported by Guido Hooiveld. >>> = >>> I had previously attributed my problem with an inappropriate way of >>> updating my packages when I updated from R 4.5 to 4.6. I then completely >>> reinstalled R4.6 and all packages, which "solved" the problem - at least >>> when I run "update.packages2 the same day I reinstalled everything (see >>> my postings and related answers from May27-29. >>> Alas, the next day the problem was back again, and ALL my packages >>> updated the day before were now identified as outdated. >>> = >>> I have no idea about the background of this problem. But a cue may be >>> possibly come from the observation that when I use RStudio to check for >>> packages that need to be updated (RStudie >Tools > Check for Package >>> Updates ...), this does not happen. >>> = >>> Karl Schilling >>> = >>> = >>> On 04.06.2026 13:49, Hooiveld, Guido via R-help wrote: >>>> Hi, I got confused by the recent behavior of update.packages() from >>>> the library utils. Since a while it reports that updates of ALL >>>> installed packages are available at the CRAN repository but turns out >>>> that this is not the case for MOST packages. In other words, most of >>>> the installed packages on my computer are of the same version as on >>>> the repository, yet it still is reported that an update for these >>>> packages is available. Of course I can re-install these (current) >>>> packages, but that is IMHO a waste of time/bandwidth. I had a look at >>>> it, and to me it seems this also somehow relates to the function >>>> old.packages(). That is, old.packages() identifies also packages as >>>> outdated, whereas they are clearly not... ?? See code below. Any >>>> suggestion on what may be causing this, and how to avoid it? Thanks, >>>> Guido >>>>> ## update.packages() identifies that updates for e.g. ## >>>>> 'ActivePathways' and 'alphavantager' are available for my >>>>> installation. ## Yet, the installed version is the same as on the >>>>> repository. ## (Note that after these 2 notifications I cancelled >>>>> update.packages() update.packages(repos=3Dhttps://cloud.r-project.org) >>>> ActivePathways : Version 2.0.6 installed in C:/Program >>>> Files/R/R-4.6.0/library Version 2.0.6 available at >>>> https://cloud.r-project.org/bin/windows/contrib/4.6 alphavantager : >>>> Version 0.1.3 installed in C:/Program Files/R/R-4.6.0/library Version >>>> 0.1.3 available at https://cloud.r-project.org/bin/windows/contrib/4.6 >>>> cancelled by user Warning message: In .available.both(repos, method, >>>> ...) : Some listed binary packages have no source >>>>> ## check and compare the output of old.packages() old.pkgs <- >>>>> old.packages(repos=3Dhttps://cloud.r-project.org) >>>> Warning message: In .available.both(repos, method, ...) : Some listed >>>> binary packages have no source >>>>> head(old.pkgs) >>>> Package LibPath Installed ActivePathways "ActivePathways" "C:/Program >>>> Files/R/R-4.6.0/library" "2.0.6" alphavantager "alphavantager" >>>> "C:/Program Files/R/R-4.6.0/library" "0.1.3" anytime "anytime" >>>> "C:/Program Files/R/R-4.6.0/library" "0.3.13" aod "aod" "C:/Program >>>> Files/R/R-4.6.0/library" "1.3.3" ape "ape" "C:/Program >>>> Files/R/R-4.6.0/library" "5.8-1" aplot "aplot" "C:/Program >>>> Files/R/R-4.6.0/library" "0.2.9" Built ActivePathways "R 4.6.0; ; >>>> 2026-05-30 02:41:50 UTC; windows" alphavantager "R 4.6.0; ; 2026-05-30 >>>> 03:56:11 UTC; windows" anytime "R 4.6.0; x86_64-w64-mingw32; >>>> 2026-05-30 01:03:29 UTC; windows" aod "R 4.6.0; ; 2026-05-30 01:07:09 >>>> UTC; windows" ape "R 4.6.0; x86_64-w64-mingw32; 2026-05-30 02:11:50 >>>> UTC; windows" aplot "R 4.6.0; ; 2026-05-30 03:14:45 UTC; windows" >>>> ReposVer Repository ActivePathways "2.0.6" >>>> https://cloud.r-project.org/bin/windows/contrib/4.6 alphavantager >>>> "0.1.3" https://cloud.r-project.org/bin/windows/contrib/4.6 anytime >>>> "0.3.13" https://cloud.r-project.org/bin/windows/contrib/4.6 aod >>>> "1.3.3" https://cloud.r-project.org/bin/windows/contrib/4.6 ape >>>> "5.8-1" https://cloud.r-project.org/bin/windows/contrib/4.6 aplot >>>> "0.2.9" https://cloud.r-project.org/bin/windows/contrib/4.6 >>>>> ## Of the 519 packages on my system, only 3 are really outdated. ## >>>>> Note that these are NOT ActivePathways' and 'alphavantager' that were >>>>> identified ## by update.packages() above. length( >>>>> old.pkgs[,"Installed"] =3D=3D old.pkgs[,"ReposVer"] ) >>>> [1] 519 >>>>> sum( old.pkgs[,"Installed"] =3D=3D old.pkgs[,"ReposVer"] ) >>>> [1] 516 >>>>> sum( old.pkgs[,"Installed"] !=3D old.pkgs[,"ReposVer"] ) >>>> [1] 3 >>>>> old.pkgs[ old.pkgs[,"Installed"] !=3D old.pkgs[,"ReposVer"] ,] >>>> Package LibPath Installed limSolve "limSolve" "C:/Program >>>> Files/R/R-4.6.0/library" "2.0.1" RCurl "RCurl" "C:/Program >>>> Files/R/R-4.6.0/library" "1.98-1.18" rjsoncons "rjsoncons" "C:/Program >>>> Files/R/R-4.6.0/library" "1.3.2" Built limSolve "R 4.6.0; >>>> x86_64-w64-mingw32; 2026-05-30 01:01:26 UTC; windows" RCurl "R 4.6.0; >>>> x86_64-w64-mingw32; 2026-04-21 00:45:50 UTC; windows" rjsoncons "R >>>> 4.6.0; x86_64-w64-mingw32; 2026-05-30 03:10:49 UTC; windows" ReposVer >>>> Repository limSolve "2.0.2" >>>> https://cloud.r-project.org/bin/windows/contrib/4.6 RCurl "1.98-1.19" >>>> https://cloud.r-project.org/bin/windows/contrib/4.6 rjsoncons "1.3.3" >>>> https://cloud.r-project.org/bin/windows/contrib/4.6 >>>>> ## sessionInfo() sessionInfo() >>>> R version 4.6.0 (2026-04-24 ucrt) Platform: x86_64-w64-mingw32/x64 >>>> Running under: Windows 11 x64 (build 22631) Matrix products: default >>>> LAPACK version 3.12.1 locale: [1] LC_COLLATE=3DEnglish_United >>>> States.utf8 [2] LC_CTYPE=3DEnglish_United States.utf8 [3] >>>> LC_MONETARY=3DEnglish_United States.utf8 [4] LC_NUMERIC=3DC [5] >>>> LC_TIME=3DEnglish_United States.utf8 time zone: Europe/Amsterdam tzcode >>>> source: internal attached base packages: [1] stats graphics grDevices >>>> utils datasets methods base loaded via a namespace (and not attached): >>>> [1] compiler_4.6.0 tools_4.6.0 >>>> --------------------------------------------------------- Guido >>>> Hooiveld, PhD Nutrition, Metabolism & Genomics Group Division of Human >>>> Nutrition & Health Wageningen University the Netherlands Visiting >>>> address: Mail address: HELIX (Building 124), room 2048 Stippeneng 4 PO >>>> Box 17 6708 WE Wageningen 6700 AA Wageningen the Netherlands the >>>> Netherlands tel: (+) 31 317 485788 fax: (+) 31 317 483342 email: >>>> [email protected] internet: http://www.humannutrition.nl >>>> http://scholar.google.com/citations?user=3DqFHaMnoAAAAJ >>>> http://www.scopus.com/authid/detail.url?authorId=3D6603101814 >>>> ______________________________________________ [email protected] >>>> mailing list -- To UNSUBSCRIBE and more, see >>>> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the >>>> posting guide https://www.R-project.org/posting-guide.html and provide >>>> commented, minimal, self-contained, reproducible code. >>> = >>> ------------------------------ >>> = >>> Message: 2 >>> Date: Sun, 7 Jun 2026 23:23:43 +0200 >>> From: Iago <[email protected]> >>> To: [email protected] >>> Subject: Re: [R] issue with update.packages(), library 'utils' >>> Message-ID: <[email protected]> >>> Content-Type: text/plain; charset=3D"utf-8" >>> = >>> I had this problem too and I don=E2=80=99t use RStudio, so this is/was = an R >>> issue. Regarding the previous discussion on this issue, the curious >>> thing is that it had never occurred before when updating from 4.4 to >>> 4.5, from 4.3 to 4.4, etc., at least to me. >>> = >>> Iago >>> = >> = >> ______________________________________________ >> [email protected] mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide https://www.R-project.org/posting-guide= .html >> and provide commented, minimal, self-contained, reproducible code. > >______________________________________________ >[email protected] mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide https://www.R-project.org/posting-guide.h= tml >and provide commented, minimal, self-contained, reproducible code. -- Sent from my phone. Please excuse my brevity. [[alternative HTML version deleted]]