Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Julia: remove a package and all its dependencies?

Tags:

packages

julia

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?

like image 407
miguelmorin Avatar asked Jun 13 '18 11:06

miguelmorin


People also ask

How do I remove packages from Julia?

When you decide that you don't want to have a package around any more, you can use Pkg. rm() to remove the requirement for it from the REQUIRE file: julia> Pkg. rm("Distributions") INFO: Removing Distributions v0.

How do I remove a package from dependencies?

To remove a dev dependency, you need to attach the -D or --save-dev flag to the npm uninstall, and then specify the name of the package. You must run the command in the directory (folder) where the dependency is located.

How do I uninstall a package without removing dependencies?

The first “rpm -qa” lists all RPM packages and the grep finds the package you want to remove. Then you copy the entire name and run the “rpm -e –nodeps” command on that package. It will, without prompting for confirmation, remove that package but none of its dependencies.


1 Answers

From the documentation:

Pkg.rm("MarketData")

rm(pkg)

Remove all requirement entries for pkg from Pkg.dir("REQUIRE") and call Pkg.resolve().

This also removes dependencies:

INFO: Removing BufferedStreams v0.4.0
INFO: Removing Codecs v0.4.0
...
like image 134
miguelmorin Avatar answered Nov 02 '22 07:11

miguelmorin