Try this:
(tested on Windows)
remove.packages(installed.packages()[duplicated(rownames(installed.packages())),1],
lib=.libPaths()[.libPaths() != .Library])
On 26/12/2007, Petar Milin <pmilin at ff.ns.ac.yu>
wrote:> Hello!
> I am using R version 2.6.1, under Ubuntu 6.06 (Dapper Drake). Recently I
> have realized that I have, in some cases, two or even three instances of
> the same package; for example: cluster, foreign etc. Typically, two
> instances occur in one of the three location:
> "/usr/local/lib/R/site-library",
"/usr/lib/R/site-library", or
> "/usr/lib/R/library", and the third is, I suppose, part of the
core system.
> I would really like to clean up my system, but the question is how to do
> that. Can anyone help me, please?
>
> Sincerely,
> PM
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Henrique Dallazuanna
Curitiba-Paran?-Brasil
25? 25' 40" S 49? 16' 22" O