How to check the changelog of a package on Linux

Last updated on November 28, 2020 by Dan Nanni

Question: When I install or upgrade a package on Linux, I want to find out what changes (e.g., new features or bug fixes) have been made in the package before or after installing it. How can I view the changelog of a (Deb/RPM) package on [Debian, Ubuntu, CentOS, Fedora]?

When a program or a library is packaged as a Deb or RPM package for distribution, several metadata files are included in the package. One of them is a changelog file, which records in reverse chronological order what changes occurred each time the package has been updated.

So if you want to find out what changes are made to the package that you are about to install or already installed, you can view the package's changelog. The changelog is also useful to check whether or not the package has incorporated a security patch for the latest vulnerability discovered. Here is how to check the changelog on Debian-based or Red-Hat based Linux.

View the Changelog of a Deb Package

There are several ways to view the changelog of an (installed or uninstalled) Deb package on Debian based Linux.

Method One: apt-get or aptitude

The latest apt-get allows you to check the changelog of a package, whether or not it is installed on your system.

$ apt-get changelog <package-name> | more

aptitude, another command-line package manager, comes with the same option as apt-get to show the changelog of a package. aptitude comes pre-installed on all Debian-based distros except for Ubuntu desktop.

$ aptitude changelog <package-name> | more

A nice thing about aptitude is that it can be supplemented with ncurses-based user interface.

To open ncurses-enhanced aptitude:

$ aptitude-curses

To search for a particular package on aptitude-curses, press / and type its name. On the description page of a package, press C to see its changelog.

Method Two: Synaptic

If you are a desktop user on Debian/Ubuntu-based system, an additional option to view a package's changelog is via synaptic, a graphical package management tool for Deb packages.

You can install it on Debian-based systems with:

$ sudo apt-get install synaptic

Once you launch synaptic, you can easily check the changelog by clicking on Get Changelog button on any package description page.

Method Three (Ubuntu-specific): Software-Updater

Another GUI method, which is specific to Ubuntu desktop, is via Software Updater. This GUI tool alerts you of any new Ubuntu software updates, and installs them on your command. You can use Software Updater to check the changes made in any to-be-installed software. Note that Software Updater cannot show the changelog of any arbitrary package as all the other methods do.

Once it is launched with:

$ update-manager

It can show the changelog of packages to-be installed (but not downloaded yet).

Method Four: /usr/share/doc

If you want to check the changelog of any already-installed package, you can simply read changelog files installed on your system as follows.

$ zless /usr/share/doc/<package-name>/changelog.Debian.gz
$ zless /usr/share/doc/<package-name>/changelog.gz

View the Changelog of an RPM Package

There are several ways to view the changelog of an (installed or uninstalled) RPM package on CentOS/RHEL/Fedora-based Linux.

Method One: rpm

If you want to check the changelog of any installed package, you can use rpm command as follows.

$ rpm -q --changelog <package-name> | more

Method Two: repoquery

If you want to check the changelog of a package which is not installed on your system, you cannot use rpm command. Instead, you can use the repoquery command which will work whether or not a package is installed. You can install repoquery with:

$ sudo yum install yum-utils

To see the changelog of any arbitrary package using repoquery:

$ repoquery --changelog <package-name> | more

Method Three: yum-changelog

Another way to view a package's changelog is via yum's changelog plugin. Install the plugin as follows.

$ sudo yum install yum-changelog

Now you can use yum command to see the changelog of individual packages before/after installing them.

$ yum changelog <package-name>

The changelog plugin has additional options to customize the changelog view. For example:

To view the 5 most recent changelogs of a package:

$ yum changelog 5 <package-name>

To view all changelogs of a package since 2015/06/01:

$ yum changelog "2015-06-01" <package-name>

Method Four (Fedora-specific): dnf

All three above methods still work on Fedora, except that you need to install yum if you have switched to dnf as a default package manager.

As of this writing, dnf does not yet provide an option to check the changelog of individual packages. One thing you can do with dnf is to show update advisories of any critical bug fixes, security patches and enhancements (similar to Ubuntu's Software Updater). To see the changelog of such critical updates, run:

$ dnf updateinfo info | more

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal (Credit Card) or Bitcoin (1M161JGAkz3oaHNvTiPFjNYkeABox8rb4g).

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean