In Julia, How do you check, list, update your packages?

12,081
using Pkg
Pkg.update()
Pkg.status()
Pkg.rm("PackageName")

This is all in the Julia manual.

Share:
12,081

Related videos on Youtube

esd100
Author by

esd100

Updated on June 04, 2022

Comments

  • esd100
    esd100 almost 2 years

    I'm wondering if there are utility commands in Julia that perform simple package management operations, such as:

    • List a single or all packages installed
    • Upgrade a single or all packages installed
    • Remove a package or all packages
    • Clean up package remnants

    These are commands that I frequently use in yarn or homebrew for example and I was wondering if there were equivalents in Julia?

  • Tasos Papastylianou
    Tasos Papastylianou almost 7 years
    Nitpicking, but since this seems to be what the user is after, technically the "upgrade" command is more the process of doing a Pkg.update(), Pkg.build(), and possibly triggering a re-precompilation for the affected packages so that they're ready to use.
  • esd100
    esd100 almost 7 years
    Thanks! I should have thought to look in the manual! It simply did not occur to me after a quick Google search for "check installed Julia packages" didn't turn up much.
  • Michael K. Borregaard
    Michael K. Borregaard almost 7 years
    The julia manual is a surprisingly useful document. I used R for years and got into the habit of googling instead of using the manual, but in Julia it really is the first-resort reference.
  • Felipe Lema
    Felipe Lema over 5 years
    This is no longer valid in v1.0. At least Pkg.installed()