Where is the installation directory of R4.3.2?

Hello,

I have installed R4.3.2 on Debian 12, but where can I find the directory? From the installation file

This installs to the default location (typically `/usr/local') for your platform: see the Installation and Administration Manual for other options.

But in /usr/local, there is any folder about R language. So, where is it? I want to completely delete it.

How about R.home() when in R in Debian?

This is what I get in Ubuntu.

> R.home()
[1] "/usr/lib/R"

Does deleting this folder completely delete the software?

I am only a casual Linux user, but wouldn't it be better to use a package manager to remove R? Perhaps

sudo apt-get purge r-base

I remembered that I had install sereval r-*, but I can't confirm all the packages now. And the way I installed the R language is

You do not need to install R to run it: you can run R by the script
`bin/R' which you can link or copy to any convenient place in your path.

For a site-wide installation, use

	make install
	make install-info
	make install-pdf

choosing to install the manuals that you made.

This installs to the default location (typically `/usr/local`) for your
platform: see the Installation and Administration Manual for other options.

Remember that I am not a Linux expert or even a skilled user!
You can run

apt list --installed | grep ^r-

to see what packages are installed that start with r-. Then you can run

sudo apt-get purge r-base

Repeat apt list --installed | grep ^r- to see if anything is left.
Manually removing folders seems likely to lead to trouble.

apt list --installed | grep ^r-

returns result that doesn't contain any number of 4.3.2, but R in terminal returns 4.3.2, so this way can't remove it.

While the installation file mentions /usr/local as the default location, it's possible that the R installation process chose a different directory on your Debian 12 system. Here's how to find the directory and completely delete it:

1. Find the R installation directory:

There are a few ways to find the directory where R is installed:

  • Use the whereis command:

whereis R

This will show you the location of the R binary and other R-related files.

  • Check the system logs:

During the installation process, the system logs should have recorded the installation directory. You can search the logs using a command like:

grep R /var/log/*

  • Look for the R executable:

Try searching for the R executable using a command like:

find / -name "R"

This will search your entire system for files named "R".

2. Delete the R installation directory:

Once you have found the R installation directory, you can delete it using the sudo rm -rf command. For example, if the directory is /usr/local/lib/R , you would use the following command:

sudo rm -rf /usr/local/lib/R

Important: This command will permanently delete the R installation directory and all its contents. Make sure you have backed up any important data before proceeding.

3. Remove R-related packages:

In addition to the main installation directory, R might have installed additional packages in other locations. To ensure a complete removal, you can also remove these packages using the apt command:

sudo apt purge r-base-core libcurl4-gnutls-dev libxml2-dev libssl-dev

4. Remove the R repository and key:

If you added an R repository during the installation process, you can remove it using the following command:

sudo apt-key del E084DAB9

This will ensure that R packages are not automatically installed again in the future.

1 Like

The installation script hints at a sanctuary within the sacred grounds of /usr/local , yet my quest for the R language files has been met with an elusive silence in that realm. As I yearn to bid farewell to this installation, I'm faced with the riddle of its secret abode. The which R command, my trusted oracle, fails to unveil the hidden path.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.