How to list the contents of a package using YUM?
There is a package called yum-utils
that builds on YUM and contains a tool called repoquery
that can do this.
$ repoquery --help | grep -E "list\ files"
-l, --list list files in this package/group
Combined into one example:
$ repoquery -l time
/usr/bin/time
/usr/share/doc/time-1.7
/usr/share/doc/time-1.7/COPYING
/usr/share/doc/time-1.7/NEWS
/usr/share/doc/time-1.7/README
/usr/share/info/time.info.gz
On at least one RH system, with rpm v4.8.0, yum v3.2.29, and repoquery v0.0.11, repoquery -l rpm
prints nothing.
If you are having this issue, try adding the --installed
flag: repoquery --installed -l rpm
.
DNF
Update:
To use dnf
instead of yum-utils
, use the following command:
$ dnf repoquery -l time
/usr/bin/time
/usr/share/doc/time-1.7
/usr/share/doc/time-1.7/COPYING
/usr/share/doc/time-1.7/NEWS
/usr/share/doc/time-1.7/README
/usr/share/info/time.info.gz
How do I find out w/YUM or RPM what files it installed?
Use the --filesbypkg argument for rpm.
rpm -qi --filesbypkg nx
How to list installed packages from a given repo using yum
On newer versions of yum, this information is stored in the "yumdb" when the package is installed. This is the only 100% accurate way to get the information, and you can use:
yumdb search from_repo repoid
(or repoquery and grep -- don't grep yum output).
However the command "find-repos-of-install" was part of yum-utils for a while which did the best guess without that information:
http://james.fedorapeople.org/yum/commands/find-repos-of-install.py
As floyd said, a lot of repos. include a unique "dist" tag in their release, and you can look for that ... however from what you said, I guess that isn't the case for you?
yum list get last available package
all in one awk
script...
... | awk '!/myCompany-apps-MYPROJECT/ {next}
{sub("-",".",$2)}
max<$2 {max=$2; split($1,f,"-"); maxV=f[4]}
END {print maxV}' file
0.0.0.47
List all packages in yum group
yum groupinfo "Development tools"
Why Yum package can be listed but not removed?
yum list
lists all available packages, while yum list installed
only lists installed packages.
So you should try the command yum list installed | grep nvidia
.
Related Topics
@Reboot Is Not Working in Cron
Run Bash Script from Another Script Without Waiting for Script to Finish Executing
Selecting the Right Linux I/O Scheduler for a Host Equipped with Nvme Ssd
The Irq in Kernel Function Asm_Do_Irq() Is Different from the One I Request in Module
How to Connect to a Terminal to a Serial-To-Usb Device on Ubuntu 10.10 (Maverick Meerkat)
Convert All File Extensions to Lower-Case
Has Anyone Been Able to Create a Hybrid of Pe Coff and Elf
Is Nice() Used to Change the Thread Priority or the Process Priority
Read a Single Sector from a Disk
Bash Alias with Argument and Autocompletion
Using Find - Deleting All Files/Directories (In Linux ) Except Any One
How to Exclude Absolute Paths for Tar
Can't Use a Variable Out of While and Pipe in Bash
Get Final Url After Curl Is Redirected
Shellscript to Monitor a Log File If Keyword Triggers Then Execute a Command