Skip to content

Instantly share code, notes, and snippets.

@swiftsam
Created February 9, 2016 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swiftsam/ea5d7a60b354b88c762d to your computer and use it in GitHub Desktop.
Save swiftsam/ea5d7a60b354b88c762d to your computer and use it in GitHub Desktop.
remove R packages installed in multiple libraries
user.libs <- row.names(installed.packages(lib.loc = .libPaths()[1]))
sys.libs <- row.names(installed.packages(lib.loc = .libPaths()[2]))
remove.packages(intersect(sys.libs,user.libs), lib=.libPaths()[2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment