R: line 238: /usr/local/lib/R/etc/ldpaths: No such file or directory

The problem shows up at the end of the log, which is that it shows

r-base-dev is already the newest version (3.5.1-2xenial)

But that's an older Ubuntu version than the one you're on, which is bionic, which is what I'm using, and it does not have

/usr/local/bin/R: line 238: /usr/local/lib/R/etc/ldpaths: No such file or directory/usr/local/bin/R: line 261: /usr/local/lib/R/bin/exec/R: No such file or directory

because the install for bionic puts R in /usr/bin.

That said, my Ubuntu uninstall experience is rusty. Anyone else ?

When you to to re-install? Be sure to start out with adding

deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/

to your

 /etc/apt/sources.list file