APT 2.0 released with new features, performance improvements

Earlier this week, Debian developer Julian Andres Klode announced the release of the Advanced Packaging Tool (APT) 2.0.  The latest version includes several new features, along with some performance and hardening improvements.  Also, the size of the APT library is significantly smaller now since Debian developers have removed “a lot of code”.

About APT

First released by Debian in 2014, APT is merely a front-end to Debian’s package management software.  The open-source command-line tool works with Linux core libraries handling the installation, configuration, and removal of packages on Debian, Ubuntu, and other Debian/Ubuntu-related Linux distros.

It’s important to note, APT 2.0 is not yet stable and resides in the Debian unstable repository.  The date of inclusion of this new version into the Debian stable repositories is unknown at this point.

New in APT 2.0

While there’re many notable changes, arguably, the most significant is that APT 2.0 now supports aptitude-style patterns for commands accepting package names.  Also, it waits for dpkg locks to have changed, and the apt/apt-get commands now have a satisfy sub-command after repeated requests by Linux scripters and developers.

Other new features and changes include:

  • If APT cannot acquire a lock, it will print the name and pid of the process that holds the lock.
  • Linux users can now specify Pins by source package by pre-pending src: to the package name.
  • Instead of using embedded reference implementations of MD5, SHA1, and SHA2 hash families, APT now uses libcrypt for hashing.
  • The apt command now does not accept regular expressions or wildcard as package arguments.
  • Developers hardened APT 2.0 by ensuring that credentials specified in auth.conf only apply to HTTPS sources.
  • Several developer changes are incorporated int APT 2.0, including a more extensible cache format, and the apt-inst library has merged into the apt-pkg library, which can now be found by pkg-config, and complies with hidden visibility by default.
  • A drove of other changes and updates. Refer to the official announcement for a complete list.

Quickly Check Your APT Version

If you use a Debian or Ubuntu-based distro, the quickest and easiest way to check your version of APT is via the command-line.

# apt policy apt

Check your apt version (sudo apt policy apt).
Check your apt version (sudo apt policy apt).

Unless you have the “unstable” repository enabled on your distro, it’s unlikely your version of APT will be 2.0.  Unless there’s a pressing reason to upgrade, it’s best just to let Debian’s/Ubuntu package release process work as intended and wait until APT 2.0 is available in the stable repository.

Conclusion

The announcement of the APT 2.0 release is exciting news.  APT 2.0’s new feature and performance and hardening improvements combined with the Debian development team’s excellent track record of methodically and meticulously developing, testing, and releasing relatively bug-free stable applications is welcome news to Linux users worldwide.

For a more in-depth overview of APT and the apt and apt-get commands, please read our article, apt vs. apt-get, and which one to use? from earlier this year.

When APT 2.0 makes it into the Debian and Ubuntu stable repositories, FOSS Linux will inform our readers as soon as possible.

Published
Categorized as News

Leave a comment

Your email address will not be published. Required fields are marked *