What is Package Manager and why you need one

Ray Hu
2 min readApr 20, 2021

--

For many computer users, package managers might seem like a hidden world, a realm untouched by their everyday computing experiences. However, for modern software developers, these tools are like trusted companions, used regularly to streamline their work. While package managers may have once been confined to the realm of hobbyists, their importance is now reaching new heights, and their influence is poised to grow rapidly.

So, what exactly are package managers, and why do they matter?

At their core, package managers are indispensable tools that simplify the discovery, installation, upgrading, and removal of applications and software components. For many, these tools are encountered when learning new technologies or following online tutorials, often without a deep understanding of the mechanics behind them.

Consider this: when you download an application, experts advise you to visit a trusted website and ensure that your connection is secure, as indicated by the green lock icon in your browser’s address bar. After downloading, you’re supposed to verify the checksum of the application to confirm its authenticity. In reality, though, very few of us go through these steps diligently.

Nobody does it. However, if you are using package manager, it does it automatically for you. A typical package manager download the package from a trusted source. The connection to the source is protected by secure protocols such as SSL. The downloaded files are verified using their hash to make sure nobody injected any malicious code to it. It often have an additional benefit, the package manager usually have some screening mechanism, a malicious developer that make a new version to steal your password is more likely to be prevented via package manager.

So how to use a package manager?

On Windows, you have choices of choco, snoop and now Microsoft is creating winget. The following command installs Zoom video conference app for you

choco install zoom

On Mac, you have choice of homebrew or macport. The following command installs the same Zoom, but the name is different from choco on Windows. Yes the name depends on the package manager. Yet most of the package managers keep them same.

brew install zoomus

On popular Linux distros, you have choice of many package managers. For example, all Debian distros comes with apt, include Ubuntu and Raspberry Pi, CentOS comes with yum. Fedora and Redhat uses rpm.

For developers, you may find all popular languages frameworks come with some kind of package manager.

When you write Python, you want to use a module made by others, what do you do? You run a command called pip with option install then followed by the module name. Like this:

pip install numpy

Similarly, you can do this for node.js/JavaScript development

npm install express --save

Some may argue, App Store is a great idea to enforce the best practices. I hope it gain popularity, but most importantly, supports scripting languages. That will make them effectively a package manager.

--

--

Ray Hu
Ray Hu

Written by Ray Hu

nobody satirist with abnormal knowledge of current affairs

No responses yet