dnf summarize
I've been working on my Rocky Linux 9 vm kickstart installation process, and due to what is already available in my local Linux mirror server, I used some AlmaLinux sources. So not only did I have to make the symlinks for ln -s epel-9-x86_64 epel-9.2-x86_64
and ln -s 9 9.2
for my copr and epel mirrors, but I also see how many packages come from each source repo.
yum list installed | awk '{a[$NF]++} END{for(i in a){j=i;gsub(/@/,"",j);if(j!="Packages"){print j": "a[i]}}}' | sort
I don't have a cutesy shell function in my profile yet. It took me a while to remember that gsub outputs the number of substitutions. It modifies the third input value directly instead of outputting the changed string.
anaconda: 398 appstream: 297 AppStream: 6 base: 13 copr-bgstack15-stackrpms: 5 epel: 5 examplerpm: 1
Comments