by bachmeier · 5y ago · 0 comments
* It's slower partly due to the sheer quantity of metadata. This metadata can be quite useful sometimes but whether it's worth the price can be debated.
* It's slower partly because DNF is transactional and is keeping track of the changes made to your system. This allows you to do things like view the history of your actions, rollback entire package operations, roll back every operation since $date, and so on. And also it can tell you whether any given package was installed directly by the user, installed as a dependency for something else, which repository it came from or whether it was installed directly from a file, and so on. All of that is super useful for auditing and recovering from screw-ups, but it means the package manager is doing a lot more work.
* The default # of parallel package downloads is a little low. It gets a lot faster if you bump it up a bit.
dnf will do a check when running subcommands like 'install' to see if it _needs_ to update the cache data (as you noted), it won't always do it. There are a few factors that play in, but you can also adjust the cache expiry time in dnf.conf.
Running "dnf install $pkg" can take upwards of a minute (~40 seconds with default repos for me) while it invokes "dnf update". This can make the act of browsing through and installing lots of packages one by one take many times as long as using apt's cached lists.
It's the only part of dnf I'm less than enamored by.
Actually it just updates the metadata - it won't install new versions of packages. It is like the apt-get update, but if you actually run 'dnf update' that's equivalent to apt's update and* upgrade.