Package Management in Julia

Package in Julia is a project which provides reusable functionality that can be used by other Julia projects via import X or using X. Julia uses Git as a repository for itself and for its package and that the installation has a built-in package manager called pkg.jl. It allows multiple registries managed by different parties to interact smoothly. It handles operations such as installing, removing, and updating packages. But it works only if the package is in Julia’s REPL.

Installation of a Package

If you want to Install a Package in Julia open the Julia Command-Line

Press ], to open the Julia package management environment.

julia> ]


If you want to know which packages we can install on julia go to this link: 

Addition of a Package

If you want to add a package in Julia then use the add command along with the name of the package to be added. Go through the following command:

(@v1.4) pkg> add DecisionTree

Here we have added DecisionTree package in Julia by using the add command. 

Note: It takes about a minute for the installation to complete.

Removing a package

To remove a package from Julia’s environment, use the rm command which is pre-defined in Julia’s library. Go through the following command:

(@v1.4) pkg> rm DecisionTree

Here we have removed the DecisionTree package in Julia by using rm command. By this command, it will remove the package completely form Julia.

Updating a Package

To update all installed packages, use update without any arguments:

(@v1.4) pkg> update

now update DecisionTree with the following command:

(@v1.4) pkg> up DecisionTree

Testing of a Package

To test a package in Julia, the test command can be used in the following format:

(@v1.4) pkg> test DecisionTree

Building a Package

Pre-defined build command can be used to build a package in Julia.

For example, to build flux package, use the following command:

(@v1.4) pkg> build  Flux

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :


Please write to us at to report any issue with the above content.