Use dpkg to view changelog

12,629

Solution 1

dpkg does not provide any facility to read the changelog of a package. you should extract the package and read the changelog

dpkg -X <package.deb> <folder>

then you can read the changelog using the dpkg-parsechangelog utility

dpkg-parsechangelog -l <folder>/usr/share/doc/<package>/changelog.Debian.gz

Since that's a real pain , if your distro is using apt-get you can use

apt-get changelog <packagename>

or

apt changelog <packagename>

Solution 2

If the package is installed, you just go to /usr/share/doc/<package_name>/ and there you will find the upstream ChangeLog and the Debian (package) changelog.

Possibly the files are gzipped, in such case, you can use zless to view them.

Solution 3

If I wanted to know e.g., why 'passwd' was being upgraded in a recent update is there a way to use dpkg to see what changed?

apt-listchanges covers this particular use case. You can view the changelog entries corresponding to an upgrade.

If you want to look at changelogs for packages that are not installed, probably the simplest thing is to look online. E.g. Go to https://packages.qa.debian.org, enter the desired source package (say dpkg), and you'll see the changelog on the right under 'links'. In this case, you'll end up at http://metadata.ftp-master.debian.org/changelogs/main/d/dpkg/unstable_changelog.

This particular site can only be used for Debian, of course.

Share:
12,629

Related videos on Youtube

mgjk
Author by

mgjk

Updated on September 18, 2022

Comments

  • mgjk
    mgjk over 1 year

    Is there a way to use dpkg to view a changelog between different versions of a package?

    If I wanted to know e.g., why 'passwd' was being upgraded in a recent update is there a way to use dpkg to see what changed?

    $ dpkg -l passwd
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name           Version      Architecture Description
    +++-==============-============-============-=================================
    ii  passwd         1:4.2-3.1    amd64        change and administer password an
    

    It's being upgraded to 1:4.2-3.3...

    I know with Debian I can look at the package notes and from there at the linked Debian changelog.

    But this doesn't apply to all deb based distros, and it's awkward for a quick look at what's new.

  • Uwe Geuder
    Uwe Geuder over 5 years
    Note that at least in Ubuntu apt-get changelog is not the same as reading the local changelog in the package under <folder>/usr/share/doc/<package>/changelog.Debian.gz. apt-get fetches the changelog from Canonical's server. For some some packages the changelogs in the package are truncated at their tail and there is indeed a comment to use apt-get changelog to read further.