Julia: How to Install, Update, Remove, and Check Versions of, Packages

Hongtao Hao / 2021-07-04


This post is based on

  1. Chris Rackauckas’s answer to this question on Stack Overflow.

  2. Julia’s Official Documentation

First, you need to import Pkg: import Pkg.

To install: Pkg.add("DataFrames").

To update: Pkg.update("DataFrames"). To update all packages: Pkg.update().

To remove: Pkg.rm("DataFrames").

To check the package version: Pkg.status("DataFrames"). To check versions for all packages, simply run Pkg.status().

You can install, update, and check versions of, multiple packages:

Pkg.add(["DataFrames", "JSON", "DataFramesMeta"])
# The same is for `update`, `rm` and `status`. 

Last modified on 2021-10-05