Learn how to completely remove `R` from Linux Mint 19 and perform a fresh installation of the updated version to avoid common issues.
---
This video is based on the question https://stackoverflow.com/q/63120908/ asked by the user 'özgün özalay' ( https://stackoverflow.com/u/14004893/ ) and on the answer https://stackoverflow.com/a/63140464/ provided by the user 'özgün özalay' ( https://stackoverflow.com/u/14004893/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions.
Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: Unistall R completely from Linux Mint 19 and do a fresh install
Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l...
The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license.
If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com.
---
Completely Uninstalling and Fresh Installing R on Linux Mint 19
If you’re a user of Linux Mint 19 and have faced issues while upgrading R from version 3.5.3 to 4.0.2, you are not alone. This can be a frustrating process, especially if the uninstallation and reinstallation don't go smoothly. Many users have encountered similar issues, where remnants of the previous installation hinder the fresh setup. In this post, we'll address how to completely uninstall R and successfully reinstall it on Linux Mint 19.
The Problem: Unsuccessful Uninstallation of R
When trying to upgrade R, users typically attempt to run commands like:
[[See Video to Reveal this Text or Code Snippet]]
While this command is intended to remove the R packages, it often falls short, leaving behind files that cause problems during fresh installations. In the case discussed, the user also deleted critical directories:
/usr/local/lib/R/site-library
/usr/local/lib/R/library
Regrettably, after employing other tactics and adding incompatible repository sources, the user ended up facing an error when attempting to run R:
[[See Video to Reveal this Text or Code Snippet]]
This issue indicated that there were still traces of the old version present, which conflicted with the newly installed version.
The Solution: A Step-by-Step Guide to Clean Removal and Reinstallation
Instead of struggling with lingering components of the old installation, our advice is to ensure that R is completely purged before proceeding with the new installation. Here’s how to do it step by step:
1. Remove R Packages Completely
Run the following command to purge all R-related packages:
[[See Video to Reveal this Text or Code Snippet]]
Following this, it's a good idea to remove any unused dependencies as well:
[[See Video to Reveal this Text or Code Snippet]]
2. Check and Delete Leftover Folders
Next, check and, if necessary, manually remove any remaining directories associated with R:
[[See Video to Reveal this Text or Code Snippet]]
Ensure there are no remnants that could interfere with the new installation.
3. Clean Up the Package List
After purging the packages, it is wise to update your package list. This helps ensure that you're working with fresh package data:
[[See Video to Reveal this Text or Code Snippet]]
4. Add the Correct CRAN Repository
When installing R, adding the correct repository is vital. You should add the appropriate CRAN repository compatible with your Linux Mint version. For version 4.0.2, you can add the Ubuntu 18.04 (bionic) repository using:
[[See Video to Reveal this Text or Code Snippet]]
Then run:
[[See Video to Reveal this Text or Code Snippet]]
5. Install R
Now, you can proceed to install R with the following command:
[[See Video to Reveal this Text or Code Snippet]]
6. Verify the Installation
After installation, you can verify the version of R installed by running:
[[See Video to Reveal this Text or Code Snippet]]
Make sure you see version 4.0.2 to confirm the upgrade was successful.
Conclusion: A Fresh Start with R on Your Linux Mint System
If, after following these steps, R still causes issues, consider switching to Ubuntu 20.04 where R version 4.0.2 works out of the box. This can be an effective way to bypass any lingering issues associated with Linux Mint 19.
It’s common to encounter obstacles during software updates, but with careful procedures, you can swiftly resolve them and ensure your statistical analysis workstation is running smoothly again.
Feel free to reach out if you have specific questions or if you need further assistance on this journey!
Информация по комментариям в разработке