Ghostboard pixel Skip to content

Debian Developer Shares Plans to Improve APT

Some under-the-hood work that should make a good impact!

APT, short for Advanced Package Tool, is one of the most prevalent choices among all the different package managers, found mainly on Debian and other Debian-based distributions such as Ubuntu.

Since its introduction way back in 1998, APT has gotten better over the years, with constant patches being made to keep it relevant in the ever-evolving space of Linux-based distros.

A recent update saw the introduction of APT 2.9.3, which shipped with an experimental dependency solver called Solver3, that's aiming to become the default solver in the near future. Thanks to The New Stack, we now have a better look at what that might be like. 😃

Not to forget, we also got the new color, in case you missed it:

Finally! The New UI for APT Adds a Splash of Color to Improve Readability
It’s time for an upgrade to the APT tool. And, this one’s pretty meaningful.

APT To Get A Boost: What to Expect?

a screenshot of apt 2.7.14 running in a terminal
Just a stand-in image of APT

Speaking during DebConf 24, Debian Developer, Julian Andres Klode shared insights into how he had been working on the Solver3 project since 2010 during his spare time.

The Solver3 is a dependency solving algorithm for APT, that starts with an empty set of packages, progressively adding any manually installed packages, then automatically installing any missing ones to resolve dependencies.

Compared to that, Julian points out that the current solver takes 45% of the total build time for rebuilding the dependency tree on Intel systems.

When measured at scale, the numbers add up, and there's plenty of time that's wasted in carrying out such a menial task. The Solver3, according to him, just takes 15% of the build time, and results in a 40% improvement in build times compared to the existing solver in his testing.

Before he could arrive at this solution, he had to go through three different approaches for handling dependencies. First, he tried to procure an external solver from FreeBSD called “picosat”, it didn't pan out owing to the many limitations of working with an external library.

Then, he tried describing the dependency tree as a “pseudo-Boolean” optimization problem, with three methods being employed, all of which entailed issues such as package sizes, weird optimization, and dependence on global optimization.

And, finally, he tried a modular graph solver method, which was not used in the project, but did help with the outcome.

Of course, Julian does mention that there's plenty of work to be done before this can be made the default, he added that:

This is going to be quite powerful, but we want to restrict it a bit to not pick solutions that actually don’t make sense. Packages for multiple architectures should be limited to only those architectures being used.
Manually packages should only be removed upon explicit request, and a replacement package should designated when appropriate. Obsolete packages should also be considered only as a last choice.

He also feels that there's a need for more benchmarking to be done, comparing Solver3 with the existing solver once it is in production, and that he would also like to bring Solver3 closer to MiniSat.

Want To Check It Out?

Currently, a beta release is planned as an opt-in for the upcoming Debian 13 “Trixie” release, which is said to arrive around February 2025.

As for when Solver3 would be made the default solver, if everything goes as planned with the beta release, then the follow-up Debian 14 “Forky” release is the prime candidate for it.

For an early look at Solver3's code, you can head to apt-pkg's main branch on Debian's GitLab repo, where you can search for “solver3”.

💬 Are you looking forward to more efficient package management on APT? Let me know below!


More from It's FOSS...

Latest