Julia: remove a package and all its dependencies?
27,593
Solution 1
From the documentation:
Pkg.rm("MarketData")
rm(pkg)
Remove all requirement entries for
pkg
fromPkg.dir("REQUIRE")
and callPkg.resolve()
.
This also removes dependencies:
INFO: Removing BufferedStreams v0.4.0
INFO: Removing Codecs v0.4.0
...
Solution 2
Step 1: Press ] to go to package manager .
Step 2: Type rm MarketData
Tested on v1.6
Author by
miguelmorin
Updated on December 05, 2021Comments
-
miguelmorin over 2 years
After adding a package, e.g. MarketData, with:
Pkg.add("MarketData")
which also installs dependencies:
INFO: Installing BufferedStreams v0.4.0 INFO: Installing Codecs v0.4.0 ...
how can I remove or uninstall the package and all its dependencies?
-
Colin T Bowers about 5 yearsUsers may also want to run
pkg> gc
to clean up removed packages from thepackages
directory. Also note, this step does not remove content from thedev
orcompiled
folder. They must be deleted manually (afterfree
has been run). -
KugelBlitz over 2 yearsHi, unfortunately trying rm is giving me an error
The following package names could not be resolved: * MyPackage (not found in project or Manifest)
Evenfree
doesn't work. gives me same error -
miguelmorin over 2 years@KugelBlitz Sorry, I stopped using Julia a few years ago. You may have better luck asking a new question.
-
KugelBlitz over 2 yearsThat's fine, I just deleted the whole folder and ran it again which resolved my issue, turned out it was no big deal!