yum-utils RPMから「repomanage」ユーティリティを確認してください。それはまさにあなたが探しているものを実行します。
[root ~]# repomanage --help
usage:
repomanage: manage a directory of rpm packages. returns lists of newest
or oldest packages in a directory for easy piping to xargs
or similar programs.
repomanage [--old] [--new] path.
options:
-h, --help show this help message and exit
-o, --old print the older packages
-n, --new print the newest packages
-s, --space space separated output, not newline
-k KEEP, --keep=KEEP newest N packages to keep - defaults to 1
-c, --nocheck do not check package payload signatures/digests
[root ~]#