100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Programming

The Julia Package Manager (Pkg)

How to use Julia's built-in Pkg to create reproducible environments, add and version packages, and understand Project.toml and Manifest.toml.

Performance & PackagesBeginner8 min readJul 10, 2026
Analogies

What Pkg Is and Why Julia Uses It

Pkg is Julia's built-in package manager, shipped as part of the standard library rather than as a bolted-on third-party tool, and it is the mechanism behind installing, updating, and removing packages as well as defining fully reproducible project environments. Every Julia project can carry its own Project.toml describing direct dependencies and a Manifest.toml pinning the exact resolved version of every package in the dependency tree, so that anyone who clones the project and runs Pkg.instantiate() gets byte-for-byte the same package versions you developed with, eliminating an entire class of 'works on my machine' bugs.

🏏

Cricket analogy: A touring squad that travels with its own kit bag containing the exact bats, pads, and ball brand it trains with never has to hope the host ground supplies something compatible — Project.toml and Manifest.toml are that kit bag, guaranteeing every teammate who clones the repo plays with identical equipment.

Activating and Managing Environments

Rather than installing every package into one shared global environment the way some language ecosystems do, Julia encourages per-project environments: running Pkg.activate(".") (or pressing ] then activate . inside the REPL) tells Pkg that any subsequent add, remove, or update should modify the Project.toml and Manifest.toml in the current directory rather than the global default environment. This isolation means two projects on the same machine can depend on completely different, even conflicting, versions of the same package without ever interfering with each other, and running Pkg.instantiate() after activating downloads and installs precisely the versions recorded in that project's Manifest.toml.

🏏

Cricket analogy: Two franchises in the same city sharing one dressing room and mixing up kit bags would cause chaos before a match, so each team gets its own separate dressing room — activating a per-project environment gives each Julia project that same separate dressing room instead of sharing one global kit.

julia
# From the Julia REPL, press ']' to enter Pkg mode, or use the Pkg API directly:
using Pkg
Pkg.activate(".")        # activate (or create) the environment in the current directory
Pkg.instantiate()        # install exactly the versions recorded in Manifest.toml
Pkg.status()             # list installed packages and their versions

# Equivalent using the Pkg REPL mode (press ']' at the julia> prompt):
# (@v1.10) pkg> activate .
# (MyProject) pkg> instantiate
# (MyProject) pkg> status

Adding, Removing, and Updating Packages

Pkg.add("PackageName") resolves and installs a package along with any compatible versions of its dependencies, recording the result in both Project.toml (the direct dependency) and Manifest.toml (the full resolved tree); Pkg.rm("PackageName") removes it, and Pkg.update() re-resolves the environment to the newest versions still permitted by any [compat] bounds declared in Project.toml. Julia's package resolver uses semantic versioning strictly, so a compat entry like DataFrames = "1" allows any 1.x release but blocks a breaking 2.0 release automatically, which is what keeps Pkg.update() from silently introducing breaking changes into a working project.

🏏

Cricket analogy: A franchise auction where a team bids for a player only within its salary cap, and the auctioneer automatically blocks any bid that would breach it, mirrors how [compat] bounds let Pkg.update() fetch newer package versions while blocking any release that would breach declared compatibility.

Running Pkg.update() inside the global default environment (rather than an activated project environment) can silently change package versions used by every unrelated script you run from that environment. Always Pkg.activate(".") a dedicated environment for real projects, and commit both Project.toml and Manifest.toml to version control for applications (Manifest.toml is often excluded for reusable libraries, since it can be overly restrictive for downstream users).

Project.toml vs Manifest.toml

Project.toml is the human-authored file listing your project's name, direct dependencies by name and UUID, and optional [compat] version bounds — it is short, readable, and meant to be edited and reviewed like any other source file. Manifest.toml, by contrast, is machine-generated and lists the complete, fully resolved dependency graph including every transitive dependency and its exact pinned version and content hash; it is what makes Pkg.instantiate() able to reproduce an environment exactly, and it should generally be regenerated by Pkg rather than hand-edited.

🏏

Cricket analogy: A team sheet naming the eleven players selected for a match is short and readable like Project.toml, while the full match scorecard recording every ball bowled, run scored, and substitution is the exhaustive, machine-generated record — that scorecard is Manifest.toml's role for a Julia project.

toml
# Project.toml (short, human-edited)
name = "MyProject"
uuid = "8f4d0f93-1234-5678-9abc-def012345678"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

[compat]
DataFrames = "1"
Plots = "1.30"
julia = "1.9"

# Manifest.toml (machine-generated, excerpt)
# [[deps.DataFrames]]
# deps = ["Compat", "DataAPI", "Future", "InlineStrings", ...]
# git-tree-sha1 = "04c738083f29f86e62c8afc341f0967d8ad9e17"
# uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
# version = "1.6.1"

The Pkg REPL Mode and Everyday Commands

Pressing ] at the julia> prompt switches the REPL into Pkg mode, where you can type commands like add, rm, update, status, and test directly without wrapping them in Pkg.function(...) calls, and pressing backspace on an empty line returns to normal Julia mode. Pkg.test() (or the pkg> test command) is particularly important because it runs a package's test suite inside a temporary, freshly instantiated copy of its declared environment, catching dependency and compatibility problems that might not show up if you only ever test inside your own already-populated development environment.

🏏

Cricket analogy: Switching from a Test match mindset to a T20 mindset requires a distinct gear change in tempo and shot selection — pressing ] to enter Pkg mode is that same context switch, moving from writing Julia logic to managing the project's package 'squad'.

Common Pkg REPL commands: add PackageName installs a package; add [email protected] pins an exact version; rm PackageName removes one; update upgrades within compat bounds; status (or st) shows installed versions; test runs the test suite in an isolated environment; precompile forces precompilation of all dependencies ahead of time.

  • Pkg is Julia's built-in package manager, providing reproducible per-project environments rather than one shared global install.
  • Pkg.activate(".") switches Pkg to operate on the current directory's Project.toml/Manifest.toml instead of the global environment.
  • Project.toml is the short, human-edited file listing direct dependencies and [compat] bounds; Manifest.toml is the machine-generated, fully resolved dependency graph.
  • Pkg.add, Pkg.rm, and Pkg.update manage packages, and [compat] entries use semantic versioning to prevent update from introducing breaking changes.
  • Pkg.instantiate() installs the exact versions recorded in Manifest.toml, making environments reproducible across machines.
  • Press ] at the julia> prompt to enter Pkg's dedicated REPL mode; backspace on an empty line returns to normal Julia.
  • Pkg.test() runs a package's tests inside a freshly instantiated environment, catching dependency issues invisible in an already-populated dev environment.

Practice what you learned

Was this page helpful?

Topics covered

#Programming#JuliaStudyNotes#TheJuliaPackageManagerPkg#Julia#Package#Manager#Pkg#StudyNotes#SkillVeris#ExamPrep

Frequently Asked Questions

21 categories · pick one to explore

Where can I get free study notes for programming and tech subjects?
SkillVeris offers completely free study notes covering programming and tech subjects, with no signup fees or paywalls. The notes are structured by course and topic, written for quick understanding, and enriched with the Learn Through Hobbies analogy method, so you can revise concepts through cricket, music, gaming, cooking and more.
Are SkillVeris study notes good for exam revision?
Yes, the study notes are designed for efficient revision: each topic answers its heading immediately, keeps explanations concise, and links to related glossary terms and cheat sheets. Students preparing for university exams or certification tests use them as quick revision notes because they distil concepts without the padding of full textbooks.
What subjects do the free study notes cover?
The study notes span the platform's main domains, including AI and machine learning, Python and programming, web development, DevOps, cloud, security and databases. Coverage mirrors the 37 live courses, so notes exist for the topics you are actually studying, and new note sets are added as courses launch.
How are SkillVeris study notes different from regular textbooks?
The notes are answer-first, concise and free, whereas textbooks are long and often expensive. Each section explains one concept directly, then reinforces it through selectable hobby analogies like cricket or cooking. Notes also cross-link to the glossary, blog and cheat sheets, letting you jump to related material instantly instead of flipping pages.
Can I use the developer study material without creating an account?
The study notes are free to access, and SkillVeris does not charge anything for its developer study material at any point. Browsing notes is straightforward from the Study Notes section, and if you want progress tracking, certificates and AI Mentor conversations tied to your learning, a free account unlocks those extras.
Do the study notes explain concepts with analogies?
Yes, this is a signature SkillVeris feature. Study notes use the Learn Through Hobbies method, explaining technical concepts through analogies from twelve domains including cricket, music, gaming, photography, travel, movies, fitness, chess, cooking, finance, business and sports. You can switch the analogy domain instantly to whichever hobby makes the concept click.
Are the revision notes suitable for last-minute exam preparation?
Yes, revision notes on SkillVeris work well for last-minute preparation because every section states the answer in its first sentences, so skimming is genuinely effective. Pair them with the relevant cheat sheet for formulas and syntax, and use the glossary for any unfamiliar term you meet while cramming.
Is there free study material for AI and machine learning?
Yes, SkillVeris provides free study notes across its AI and ML catalogue, covering Python for AI, deep learning frameworks like PyTorch and TensorFlow, Hugging Face Transformers, Large Language Models, RAG, AI agents and MLOps. All of it is free, making it a strong resource for Indian students and global learners alike.
Can beginners understand the study notes, or are they for experts?
Beginners can absolutely use them. The notes are written in plain language, define terms as they appear, and lean on hobby analogies to make abstract ideas concrete. Difficulty scales with the underlying course level, so beginner-course notes stay gentle while advanced-course notes go deeper, and the glossary supports you throughout.
How do study notes connect with SkillVeris courses?
Study notes are organised by course and topic, so they map directly to the structured courses and their 24–40-lesson curriculum. Many learners study a lesson first, then use the matching notes for revision before module assessments and the final exam, where 80 percent is required to pass and earn the certificate.
Are there study notes for Python specifically?
Yes, Python is well covered through notes tied to the Python-focused courses, including Python for AI and ML. Topics span fundamentals through applied machine learning usage. You can reinforce the notes with Python practice in Code Lab, which runs code in your browser with no installation required.
Do the study notes include code examples?
Yes, study notes include code examples wherever a concept is best shown in code, alongside explanations, key points and analogies. Reading a snippet in the notes and then reproducing it yourself in Code Lab is an effective loop, since Code Lab lets you run code in the browser across six languages.
How often is new study material added to SkillVeris?
Study material grows alongside the course catalogue. Whenever new courses join the platform's 37 live courses, matching study notes, glossary entries and cheat sheets are added so the resources stay in sync. Existing notes are also refined over time, so it is worth revisiting topics you studied earlier.
Can I use SkillVeris notes to prepare for technical interviews?
Yes, the notes make excellent interview revision because they compress each concept into direct, answer-first explanations, which mirrors how you should answer interview questions. Combine them with the SkillVeris interview questions feature, which includes readiness scoring, to test whether your revision has actually made you interview-ready.
Are the study notes mobile-friendly for studying on the go?
Yes, the study notes are built to load fast and read comfortably on mobile devices, so you can revise during a commute or between classes. Sections are short and answer-first, which suits small screens, and analogy switching works on mobile too, letting you study anywhere without carrying books.
What is the difference between study notes and cheat sheets?
Study notes explain concepts in depth with context, examples and analogies, making them ideal for learning and revision. Cheat sheets are compact quick-reference summaries of syntax, commands and key facts, ideal once you already understand a topic. Most learners study the notes first, then keep the cheat sheet handy while coding.
Do study notes help if I am stuck on a course lesson?
Yes, reading the matching study notes often clarifies a lesson because the same concept is explained from a different angle, frequently with a different analogy. If you are still stuck, ask the AI Mentor, which answers 24/7 at Quick, Detailed or Deep-dive depth until the idea genuinely makes sense.
Is there free study material for DevOps and cloud topics?
Yes, SkillVeris carries free study notes for DevOps and cloud topics as part of its coverage across 37 live courses. The material suits learners following the DevOps Engineer or Cloud Engineer paths, and it links to related glossary terms and cheat sheets so you can revise the whole toolchain in one place.
Can school or college students in India use these notes for projects?
Yes, students across India and worldwide use SkillVeris notes for coursework, projects and exam preparation, and everything is free, which matters for student budgets. The notes explain concepts clearly enough to cite in project reports, and Code Lab lets you prototype the project code directly in your browser.
How should I combine study notes with other SkillVeris resources?
A proven loop: learn from a course lesson, revise with the matching study notes, look up unfamiliar terms in the glossary, keep the cheat sheet open while practising in Code Lab, and quiz yourself with interview questions. The AI Mentor fills any remaining gaps 24/7, at whatever depth you need.

What Learners Say

Real journeys from the SkillVeris community — swipe for more.

SkillVeris taught me Python through Cricket. Now I’m building real projects and feeling confident!
Arjun S. · B.Tech Student
The best platform for hobby-based learning. Concepts finally stick.
Priya R. · Data Analyst
I went from zero coding to a portfolio of projects — all by learning through my love for gaming. Landed my first internship!
Kabir M. · CS Undergraduate
Trending Topics50 popular tags — tap to explore
Trending CoursesAll 37 free courses — tap to browse