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.
Related videos on Youtube
Author by
esd100
Updated on June 04, 2022Comments
-
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 almost 7 yearsNitpicking, 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 almost 7 yearsThanks! 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 almost 7 yearsThe 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 over 5 yearsThis is no longer valid in v1.0. At least
Pkg.installed()