Debian – Use dpkg to view changelog

debdebiandpkg

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.

Best Answer

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>
Related Question