Introduction
This article is a beginner introduction to Arch Linux’s pacman. So it should not be treated as a comprehensive guide to pacman. You can find the comprehensive guide here.
Arch Linux pacman (package manager) is one of the distinguishing features of Arch Linux. When we installed Arch for the first time, we probably had to install a package once so we are familiar with commands looking like this:
$ sudo pacman -Sy git
A package manager's goal is to make it possible to easily install, update and remove packages. Without package managers, we would probably be fetching packages from different sources, verifying the digital certificates and checksums and keeping track of dependencies manually.
They are many types of package managers for different Unix/Linux-based systems. Package managers also made their way into their Windows systems, for example, chocolatey.
So what is a package anyway?
A package is an archive containing:
- all of the (compiled) files of an application.
- metadata about the application, such as application name, version, dependencies, etc.
- installation files and directives for pacman.
Basic pacman commands
Installing a package
$ sudo pacman -S <package-name>
Note: The -S really means synchronise, so the command above to install a new package is also the same command to upgrade an already installed single package.
Removing a package, without removing its dependencies
$ sudo pacman -R <package-name>
Removing a package together with its dependencies
$ sudo pacman -Rs <package-name>
Updating all packages in the system
$ sudo pacman -Syu
Conclusion
I hope you find this article helpful as you progress in your Linux journey. You can read more about pacman from the wiki.
Please leave a like, comment and share and also you can consider buying me a coffee too.
Top comments (0)