A package is an organized set of files and directories that groups source code, resources, and metadata related to a specific functionality.
In simpler terms, you could think of them as boxes containing tools and utilities that you can add to your project, making it easier to build programs and applications.
Inside a package, it’s common to find one or more libraries. The difference from a library is that they come “packaged” (hence the name) to make it simpler for you to include them in your work.

Just like libraries, packages can be:
- Internal, created by you or a colleague at work
- Open Source, open source and maintained by the community
- Proprietary or “third-party”, usually paid
Furthermore, the main “trick” of packages is that they include additional information in the form of metadata.
This metadata can include the title, the author’s name, and especially important, information about the version and its dependencies (also with their versions). This facilitates version management, which we already saw could become a real nightmare.
What is a Package Manager
Packages are added to your project through a package manager. This is a big difference compared to a library (which you simply download and plug into your project).
Package managers are fundamental tools in the software development process, especially to keep you from going crazy with versions and dependencies.
The main function of a package manager is to facilitate the automated installation, updating, configuration, and removal of packages and their dependencies.
Package managers also handle dependency resolution. This means that if a package depends on other packages to function correctly, the package manager will take care of automatically downloading and installing the appropriate versions of those dependencies.
Additionally, it’s common to have public online repositories, where available versions of packages and their dependencies are stored (this way, adding a library to your program is even easier).
Packages and package managers go hand in hand. Each package manager uses its own type of package. Moreover, they are specific to each programming language.
Most programming languages, such as C#, Python, Java, JavaScript, or C++, for example, have one or several package formats and package managers. In many cases, they are included with the development environment or the language itself.
Finally, package managers usually have one or several configuration files. Generally, it’s a text file (in simple format, toml, yaml, json…) that has a specific name.
Examples of Package Managers
Let’s see it better with some examples.
Node.js uses “NPM” (Node Package Manager) as its default package manager. To add, update, or remove packages, developers can use commands like:
npm install package_name
npm install package_name@version
npm uninstall package_name
In this case, the configuration file is packaje.json
Python uses the package manager “PIP” (pip installs packages). With a simple command line, developers can install, update, or remove packages. For example:
pip install package_name
pip install package_name==version
pip uninstall package_name
The configuration file is usually called requirements.txt
C# uses “NuGet” as its standard package manager. NuGet is a command-line tool and a Visual Studio extension that allows developers to easily add, remove, and update packages in C# and .NET projects. For example:
nuget install PackageName
nuget install PackageName -Version Version
nuget uninstall PackageName
In the past, C# used a “packages.config” file to manage dependencies in older projects, but with the introduction of the PackageReference approach, dependency management has become simpler and more efficient. Instead, dependencies are now added directly to the .csproj file.
In C++, “Conan” has become a popular package management tool. Conan allows developers to easily manage libraries and their dependencies, facilitating the build and linking process for C++ projects. Usage examples:
conan install PackageName/Version
conan install PackageName/Version@user/channel
conan remove PackageName/Version
The configuration file is usually called conanfile.txt or conanfile.py
