Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Accidentally I have installed R library in my home directory


And I want to move all this "/R/i686-pc-linux-gnu-library" thing to original R libraries directory.

I probably can't use mv as it will mess up everything.

What is the proper way of moving installed (R) libraries in Linux?

share|improve this question

You should give it the right permissions after moving them...

Use a package manager next time; or use one now, to ensure it's installed the proper way.

share|improve this answer

The safest way is to uninstall it then reinstall in the in the correct place.

It's really the only way to be sure you don't run into any problems.

share|improve this answer

Although I agree with both niffle and Tom, you really should just reinstall, doing something like this might, I say might, also work:

$ cp -rv /home/user/R/i686-pc-linux-gnu-library /usr/lib/R/library/

Then apply the same permissions you see in other sub folders of /usr/lib/R/library/.

Why do you want to move the files though? The library will work perfectly well from your $HOME and it will not be deleted if you upgrade your machine. Is there a particular reason you want to go to the trouble of moving it?

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .