Package Registry vs Package Manager
People think the package manager and the package registry are one thing, since both are often called npm. They are not. The registry is the website that stores the packages. The package manager is the tool on your computer that downloads them and puts them in your project.
Package Registry
A website that keeps packages so anyone can get them by name.
A package registry is a website that stores packages so anyone can download them. Each language has its main one. JavaScript has the npm registry. Python has the Python Package Index, called PyPI. Your package manager asks it for a name and a version, then gets it. Companies also run their own, kept private.
Package Manager
A tool that fetches and updates the code packages your project needs.
A package manager fetches, installs and updates the code your project needs. You type one command with a package's name, and it fetches the right version. It also fetches everything that package needs in turn. It writes down what it installed, so a teammate can get the exact same set. Most languages have their own, like npm for JavaScript and pip for Python.
In one line
- Package Registry
- A website that keeps packages so anyone can get them by name.
- Package Manager
- A tool that fetches and updates the code packages your project needs.