GPL-3.0-only licensed by Jens Petersen
Maintained by [email protected]
This version can be pinned in stack with:pkgtreediff-0.4@sha256:57db59ada06a39ba4f2b371604967d1a4ce609be8426c38924a0fb86a7e6f2c5,1612

Module documentation for 0.4

There are no documented modules for this package.


Hackage GPL-3 license Stackage Lts Stackage Nightly Build status

pkgtreediff compares the NVRs (name-version-release) of RPM packages in OS package trees and/or installations:

  • An OS tree can be referenced by an url or directory containing a tree of rpm files.
  • A file containing a list(s) of rpm NVRs can also be compared
  • Commands can also be used to get installed RPMs, eg:
    • "rpm -qa"
    • "ssh myhost rpm -qa"
    • "podman run --rm myimage rpm -qa"

Usage examples


Compare the content of two rpm based containers (new added packages in fedora:31)

$ pkgtreediff --new "podman run --rm fedora:30 rpm -qa" "podman run --rm fedora:31 rpm -qa"
libgomp.x86_64  9.2.1-1.fc31
tss2.x86_64  1331-2.fc31
yum.noarch  4.2.9-5.fc31

Package trees

Package source changes between Fedora 30 and 31 Server at GA (ignoring release bumps):

$ pkgtreediff --ignore-release{30,31}/Server/source/tree/Packages/
- 389-ds-base.src
- GConf2.src  3.2.6-25.fc30
- GeoIP.src  1.6.12-5.fc30
- GeoIP-GeoLite-data.src  2018.06-3.fc30
- ImageMagick.src
ModemManager.src: 1.10.0-1.fc30 -> 1.10.6-2.fc31
NetworkManager.src: 1.16.0-1.fc30 -> 1.20.4-1.fc31
- ORBit2.src  2.14.19-21.fc30
- OpenEXR.src  2.2.0-16.fc30
- compface.src  1.5.2-27.fc30
- comps-extras.src  24-5.fc30
+ conmon.src  2.0.1-1.fc31
container-selinux.src: 2.95-1.gite3ebc68.fc30 -> 2.117.0-1.gitbfde70a.fc31
- container-storage-setup.src
+ containerd.src  1.2.6-2.20190627gitd68b593.fc31
zchunk.src: 1.1.1-3.fc30 -> 1.1.2-3.fc31
zd1211-firmware.src: 1.5-4.fc30 -> 1.5-5.fc31
- zerofree.src  1.1.1-3.fc30
- zfs-fuse.src
- zile.src  2.4.14-3.fc30
zip.src: 3.0-24.fc30 -> 3.0-25.fc31
zlib.src: 1.2.11-15.fc30 -> 1.2.11-19.fc31
zram.src: 0.3-1.fc30 -> 0.4-1.fc31
zstd.src: 1.3.8-2.fc30 -> 1.4.2-1.fc31
- zziplib.src  0.13.69-5.fc30

Updated: 918
Added: 17
Deleted: 765
Arch changed: 0
Total packages: 1690 -> 942


Compare the packages on local and another host:

pkgtreediff "rpm -qa" "ssh otherhost rpm -qa"

Any types of sources can be compared, together with the use of flags.


Builds are available in copr for Fedora, EPEL, and OpenSuSE (more details).



0.4 (2020-03-13)

  • support files of lists of rpms
  • support commands for getting package NVRs
    • to run “rpm -qa” etc, locally or remotely
    • note commands must be quoted and include a space to be recognized
  • fix sorting of packages by rpmvercmp() style ordering (#3) (fixes cumulative trees like CentOS for example)
  • add –timeout option for http (#1)

0.3 (2019-06-06)

  • add –pattern for href filename globbing
  • use http-directory-0.1.4 for httpDirectory basic filtering

0.2.1 (2019-06-06)

  • better recursion handling and href filtering

0.2 (2019-06-05)

  • print summary
  • add –ignore-arch

0.1 (2019-06-04)

  • –ignore-version option

0.0 (2019-05-31)

  • Initially created.
  • –ignore-release option