eddelbuettel/r2u

Remove.package is not automagically translated

jmiahjones opened this issue · 2 comments

I don't know if this is a breakage in the upstream bspm package, but I have a very simple example of something I ran into today:

r$> install.packages("rextendr")
...
# Everything works beautifully
r$> remove.packages("rextendr")
Removing package from ‘/home/aperson/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
Error in find.package(pkgs, lib) : there is no package called ‘rextendr’

I was using this in radian, but I also found that this occurs in the plain old R interactive shell as well.

For now, I can just remove the r-cran-FOO apt package, but I thought I'd report this.

Okay, wow. I found the answer pretty quickly here. So the issue is that, in order to accommodate multi-user systems, the bspm developers don't want to easily remove packages installed by another user and encode this conscious choice with the scarier-looking bspm::remove_sys.

I don't know how much you want to really think about this, but such a caveat might be a good thing to point out in the README.

Yes something should be in the README and your suggestion in #19 is a start but I may edit it some more.

Also recall that because bspm "maps" from install.packages() to apt so that the system managers handles it, you by that very design have all the removal options of the system manager. It simply is a different realm than remove.packages(). But that should indeed be clarified.