source: remove.packages("AnnotationDbi") library("AnnotationDbi")
console: detach("package:AnnotationDbi", unload = TRUE) library("AnnotationDbi")
source: remove.packages("AnnotationDbi") library("AnnotationDbi")
console: detach("package:AnnotationDbi", unload = TRUE) library("AnnotationDbi")
detach()
detaches the package from the search()
path; it does not remove the package from the library where it is installed.
Usually, removing a package is accomplished with remove.packages("AnnotationDbi")
. One common reason for failure is if the package is installed in more than one library location.
pkgs <- installed.packages()
idx <- pkgs[, "Package"] %in% "AnnotationDbi"
sum(idx) # more than 1?
pkgs[idx,]
These might be removed with more than one call to remove.packages()
.
It might be that some of the library locations are not writeable by the user (e.g., an 'Administrator' installed the package). The administrator must then remove the package.
AnnotationDbi does not contain any compiled (C) source code, so the following is not an explanation for your specific question. It might be (on Windows) that the library was in use by another R session, or that in the current session a compiled 'dll' is in use in the current session that depends or imports AnnotationDbi. remove.packages()
will then fail, silently, leaving a corrupt installation. All R sessions should be closed, and the corrupt package installation location directory removed 'by hand' through the operating system.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Thank you, but how can I remove it from library?
I updated my answer. You should please update your question to copy and paste the commands that you use in your session, and the output of
sessionInfo()
. Here's mine...