Ghostboard pixel Skip to content

Apt Command is Finally Getting the Much Needed History Features

In the upcoming versions of apt, you'll be able to see the history of package transactions and get details on them.

apt history features

Looking at this merge request in Apt code, I can see a very useful feature coming to Debian and Ubuntu-based distros. It may not be for every end user but sysadmins are surely going to appreciate it.

The apt command is getting new history features, that allow users to look into past apt command operations.

New history sub-commands in apt

In the future, apt command will have two new sub-commands that introduce history log parsing:

  • apt history-list : To list all previous package transaction history.
  • apt history-info : To show detailed information about a selected package transaction.

Why does it matter? Well, for sysadmins, sometimes it becomes necessary to see what packages they installed or upgraded and when it was installed or removed and what happened during that package transaction.

Up until now, users were restricted to using low-level dpkg command with grep to find out these details.

dpkg -l | grep <package_name>

With the dedicated sub-commands in apt, there would be no need to create combinations of commands and look through the log files just to know what and when a package change happened.

The first apt history-list shows the entire package history log. The second one apt history-info makes things a lot easier by showing details only on selected package transactions. This streamlines the process, as it is now easier to jump into a specific entry and only read that instead of reading the entire history log.

I'll update our apt command guide when this new feature is available.

Using apt Commands in Linux [Ultimate Guide]
This guide shows you how to use apt commands in Linux with examples so that you can manage packages effectively.

Inspired by DNF...in a good way

It's good to see that developers are adding new, useful features in the apt command. Some will say that these are inspired by Fedora's DNF package manager. Which might not be untrue, as DNF has had this feature for some time now.

In fact, let me show you these equivalent DNF commands:

dnf history list
dnf history list
DNF history list

And when you have the command transaction ID, you can use it to get details obn it:

dnf history info <command-transaction-id>
Details on a DNF package operation in history

Looking at these, I am guessing apt should have similar output for their history features.

It's not just the history sub-commands, even some of the recent changes apt introduced in version 3.0 are seemingly inspired by DNF.

I don't mind apt getting inspired by dnf. As the end users, we should appreciate the inclusion of useful features. What do you think?

🎗️
Here's why you should opt for It's FOSS Plus Membership:

- Even the biggest players in the Linux world don't care about desktop Linux users. We do.
- We don't put informational content behind paywall. Your support keeps it open for everyone. Think of it like 'pay it forward'.
- Don't like ads? With the Plus membership, you get an ad-free reading experience.
- When millions of AI-generated content is being published daily, you read and learn from real human Linux users.
- It costs just $2 a month, less than the cost of your favorite burger.

Become a Plus Member today and join over 300 people in supporting our work.
Abhishek

Abhishek

Linux user with passion for open source software and self-hosting. Also, creator of It's FOSS.

All articles

More in Development Updates

See all

More from Abhishek

See all