When comparing Pacman vs pkgsrc, the Slant community recommends Pacman for most people. In the question“What are the best Linux package managers?” Pacman is ranked 1st while pkgsrc is ranked 7th. The most important reason people chose Pacman is:
Pacman is objectively one of the fastest package managers around. This is because it's very minimalistic and it installs only prebuilt packages.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Fast
Pacman is objectively one of the fastest package managers around. This is because it's very minimalistic and it installs only prebuilt packages.
Pro Packaging signing keyring and mirror list
Both are also provided through packages which keeps them up to date.
Pro Advanced when you want it
Pacman does not overwrite modified configuration files. Instead, it saves a .pacnew file for it which you can later merge at your leisure.
Pro Manages dependencies reliably
Pro Simple syntax
Pacman has a relatively simple syntax which is easy to get used to. For example: pacman -Syu
to update, pacman -S foo
to install etc...
Commands are not long and there are not many different commands to learn by heart.
Pro Pacman hooks add power and flexibility
Hooks are scripts that can run automatically before and after Pacman transactions like installation and removal of packages. For example, Pacman hooks can be used to automatically create system users and files during the installation of packages. Pacman hooks can also be used to delete configuration files and clear caches during the removal of packages.
Pro Many wrappers available which extend functionality
Here are three examples: Powerpill, Yay, and Octopi. Powerpill extends Pacman by enabling asynchronous downloads of packages from multiple mirrors using Aria2 and Reflector. Yay extends Pacman, by enabling automatic download, compilation, and installation of packages from the AUR. Octopi extends Pacman with a GUI frontend written in Qt.
Pro Easy to create custom repositories
Pacman makes it fairly easy and straightforward to create your own repository with signatures.
Pro Simple and easy to use with custom repositories
The instructions and configurations for using a custom local or remote repositories are pretty simple and straightforward.
Pro Zstd compression
Uses Zstd compression for fast downloads & updates.
Pro Synchronizes package lists with the master server
It allows the system to always be up to date.
Pro Supports colored output
And looks cleaner and nicer with such thing enabled. Simply find and uncomment "Color" option in /etc/pacman.conf or add it yourself if it doesn't exists.
Pro Can be made to use any downloader
Allows to change its downloader from internal to any other like wget or aira2.
Pro Kernel build ordered
Pro Supports deltas
However default Arch Linux mirror servers does not provide deltas, so it is not so useful like with DNF.
Pro pkgin is an apt-like tools for installing binaries from pkgsrc
pkgin aims to be a tool similar to apt/yum for managing pkgsrc binaries by relying on pkg_summary for installing, removing and upgrading packages and dependencies, using a remote repo.
Pro Adapted for use on over a dozen different operating systems
Has been adopted to be used on several Unix-like operating systems and Windows. It's also the default package manager of DragonflyBSD and of the (now discounted) Bluewall Linux distro.
Pro Installs and works in the same way as MacPorts
Installs its own dependencies which means that it is very secure. Cannot install anything unless you use the "sudo" command which is in keeping with the Unix philosophy.
Pro Both binary packages and source build possible
Fast software installation is possible by using binary packages. It's also easy to build from source which allows for different compile-time options (like different UI backends) as well as gaining access to pre-release versions of software in certain cases.
Pro Offering tooling for backporting fixes
Backporting fixes can be done by cherry-picking updates from a newer branch (pkgsrc is released every 3 months) and creating a package. Sometimes bugs need to be fixed for production and there is neither a fix in newer pkgsrc nor the softwares upstream. So pkgsrc has tools like pkgdiff, mkpatches, etc. that help with developing patches and building binary packages from that. A bit of documentation about that process can be found here.
Pro Does not need Xcode command line tools or Xcode.
This means that you can install it fresh on a new installation of MacOS and have all your favorite apps installed right from the start.
Pro Works easily with Ansible
Can be used from within Ansible to install packages on macOS.
Pro Easy installation if you use 3rd party scripts
This one works brilliantly.
Cons
Con Bad handling of conflicts
Relying on the entire system being updated to the exact same version, making the famed rolling-release model ironically even worse in practice than the traditional version model.
Con Poor Multiarch support
can not install regular foreign arch packages alongside and needs specific nade subarch packages.
Con Doesn't always clean up after itself
Pacman leaves new configuration versions around and generally doesn't handle file conflicts smoothly.
Con Naive
For example, it doesn't allow you to purge (remove package and its configuration files).
Con No official way to downgrade packages
This is related to it not supporting partial system upgrades. The very same reason prevents it from downgrading a particular package easily. Doing so can easily result in conflicts and may require a system downgrade or downgrade of multiple packages.
Con Unintuitive syntax
Pacman has a difficult syntax and commands to remember.
Con No partial upgrades
Pacman just doesn't support partial upgrades. It has to always be system upgrade and never package upgrade.
Con Not KISS
It is not simple or does follow the UNIX philosophy instead it tries too much at the same time which results in slowness and errors.
Con Bloated
It is over complicated and bloated compared to other *NIX package managers like dpkg, rpm or pkgsrc. For example, they follow the Unix philosophy and do "one" thing well, which is to install local packages and use other frontends to configure, remote install or to search for packages/files. Pacman, however, tries to do all those tasks in one app, which adds some flaws.
Con Painfully slow
It takes ages to update the system compared to dpkg or rpm, which due its poor performance by unpacking very large packages with many files to the filesystem.
Con No parallelization
Neither downloads nor processing can be set to run in parallel.
Con You can not create pacman packages under a non-pacman distribution
For example on fedora/suse/debian/ubuntu, you can easily create rpm and deb packages, but you can not create pacman packages, which makes it uncomfortable to support arch/pacman packages.
Con Relatively complicated setup and installation
Installing and setting pkgsrc up is a bit more complicated than in other package managers where it often consists in running a single script.
Con Not so broadly used on MacOS as compared with MacPorts
You do not hear about Pkgsrc as openly as you hear the words "HomeBrew" or "MacPorts".
Con Outdated packages
Some packages are outdated.
Con Can't install some packages
Even building well known packages (except MacPorts) from source using the ports can fail.