Which should be correct so far. Can I safely conclude your command is accurately determine a package is installed? I did find out rpm -q bind just now. It it equavalent to your command also? I think this is working. And I like single line solutions.
NoahSussman You could try yum -C list installed bind to avoid network. This keeps all the plugins enabled just in case you have anything exotic that affects lookups in yumdb and also tells you the repo the package was installed from — plasmid Show 3 more comments. John John 8, 1 1 gold badge 27 27 silver badges 33 33 bronze badges. This solution using rpm should be the accepted answer as it returns a clean exit status and does not require calling out to a bunch of remote URLs as the yum solutions do.
Please take a look at my response above regarding using the cache to avoid network access — plasmid Thank you, I now see how yum and rpm can be used interchangeably here!!
It's not obvious, but if installed is listed under the Repo tag, it's installed. Otherwise it would list the repo that it is available from. This results in connecting to remote yum repos when all I want is to see what's happening on my local machine. I have also RedHat Commands. OpenSolaris Commands. Linux Commands. SunOS Commands. FreeBSD Commands. Full Man Repository. Advanced Search.
Contact Us. Forum Rules. Mark Forums Read. Thread Tools. View Public Profile for dave Find all posts by dave See the Error Handing page for details and examples.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 5 years, 8 months ago. Active 3 years ago. Viewed 64k times. I could simply ignore it or suppress it, but I was curious if there was a better way? Improve this question. Community Bot 1 1 1 silver badge.
Derek Elder Derek Elder 73 1 1 gold badge 1 1 silver badge 8 8 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. To understand what these numbers in package name mean read package naming conventions. Or even directly querying the package name will yield you the same result as the second example above. If the system is configured with YUM then it can list all installed packages for you and you can grep out your desired package from it. APT based systems like Debian, Ubuntu, etc, dpkg command can be used to verify if the package is installed —.
If you have an apt repository configured then you can try to install emulation of the desired package. One of the Linux interview questions is how to find the package installation date?
0コメント