RHEL/CentOS - How can I find all rpm packages which depends on a particular package? The Next CEO of Stack OverflowCheck which RPMs depend on this packageHow to list packages with files in a particular directory?how to find which repo does one rpm package belong toWhat can I do to fix a “could not resolve host: mirrors.fedoraproject.org” when applying system updates?Could not find libjava.soHow to convert RHEL rpm to CentOS“-bash: javac: command not found” error after installing OpenJDK 1.7How to download 3rd party rpm packages with all the dependencies for offline installation?How do i list out all dependencies for a package in Centos/Rhel?Download all RPM packages from CentOS repo?How query custom installed rpm package
Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?
What is the result of assigning to std::vector<T>::begin()?
Calculus II Question
How do I transpose the 1st and -1th levels of an arbitrarily nested array?
What exact does MIB represent in SNMP? How is it different from OID?
Multiple labels for a single equation
How to solve a differential equation with a term to a power?
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
Preparing Indesign booklet with .psd graphics for print
How do I avoid eval and parse?
Is micro rebar a better way to reinforce concrete than rebar?
How do I go from 300 unfinished/half written blog posts, to published posts?
Received an invoice from my ex-employer billing me for training; how to handle?
Return the Closest Prime Number
Sending manuscript to multiple publishers
Written every which way
Why does the UK parliament need a vote on the political declaration?
Are there any limitations on attacking while grappling?
What does convergence in distribution "in the Gromov–Hausdorff" sense mean?
MessageLevel in QGIS3
Has this building technique been used in an official set?
If the heap is initialized for security, then why is the stack uninitialized?
To not tell, not take, and not want
Limits on contract work without pre-agreed price/contract (UK)
RHEL/CentOS - How can I find all rpm packages which depends on a particular package?
The Next CEO of Stack OverflowCheck which RPMs depend on this packageHow to list packages with files in a particular directory?how to find which repo does one rpm package belong toWhat can I do to fix a “could not resolve host: mirrors.fedoraproject.org” when applying system updates?Could not find libjava.soHow to convert RHEL rpm to CentOS“-bash: javac: command not found” error after installing OpenJDK 1.7How to download 3rd party rpm packages with all the dependencies for offline installation?How do i list out all dependencies for a package in Centos/Rhel?Download all RPM packages from CentOS repo?How query custom installed rpm package
Linux distribution: Red Hat Enterprise Linux Server release 6.10 (Santiago)
Context:
I need to uninstall all old versions of Java in my server.
I have the list of java paths, example:
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el6_10.x86_64/jre/bin/java
I can find the pacakage owning this file by:
rpm -qf /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el6_10.x86_64/jre/bin/java
java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
Now, how to find all packages depending on java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
, so that I can see whether it is safe to remove the package ?
Below command says no other packages depends on this openjdk package (Ref: Question-166343):
rpm -q --whatrequires java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
no package requires java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
But, mysql-connector-java
depends on this package.
Reason: rpm --whatrequires
option's argument is CAPABILITY provided by a package , not package name and searching using CAPABILITY is not straightforward.
Below command was also not returning any results:
repoquery --requires --resolve --recursive java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
So, is there any simple way to identify all rpm packages which depends on a particular package?
By package , I mean java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
(not java-1.8.0-openjdk-headless
)
centos rhel package-management yum rpm
add a comment |
Linux distribution: Red Hat Enterprise Linux Server release 6.10 (Santiago)
Context:
I need to uninstall all old versions of Java in my server.
I have the list of java paths, example:
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el6_10.x86_64/jre/bin/java
I can find the pacakage owning this file by:
rpm -qf /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el6_10.x86_64/jre/bin/java
java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
Now, how to find all packages depending on java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
, so that I can see whether it is safe to remove the package ?
Below command says no other packages depends on this openjdk package (Ref: Question-166343):
rpm -q --whatrequires java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
no package requires java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
But, mysql-connector-java
depends on this package.
Reason: rpm --whatrequires
option's argument is CAPABILITY provided by a package , not package name and searching using CAPABILITY is not straightforward.
Below command was also not returning any results:
repoquery --requires --resolve --recursive java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
So, is there any simple way to identify all rpm packages which depends on a particular package?
By package , I mean java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
(not java-1.8.0-openjdk-headless
)
centos rhel package-management yum rpm
Did you install the java package viayum
?
– Nasir Riley
2 days ago
Yes. Installed via yum.
– penguin
2 days ago
Add the script that you have so far to your question.
– Nasir Riley
2 days ago
I see in other questions the "yum deplist" option; alternatively, you could run a test-remove:yum --assumeno ...
orrpm --test ...
– Jeff Schaller♦
2 days ago
@JeffSchalleryum deplist
would show the packages on which it depends but not what depends on the package itself.
– Nasir Riley
2 days ago
add a comment |
Linux distribution: Red Hat Enterprise Linux Server release 6.10 (Santiago)
Context:
I need to uninstall all old versions of Java in my server.
I have the list of java paths, example:
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el6_10.x86_64/jre/bin/java
I can find the pacakage owning this file by:
rpm -qf /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el6_10.x86_64/jre/bin/java
java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
Now, how to find all packages depending on java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
, so that I can see whether it is safe to remove the package ?
Below command says no other packages depends on this openjdk package (Ref: Question-166343):
rpm -q --whatrequires java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
no package requires java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
But, mysql-connector-java
depends on this package.
Reason: rpm --whatrequires
option's argument is CAPABILITY provided by a package , not package name and searching using CAPABILITY is not straightforward.
Below command was also not returning any results:
repoquery --requires --resolve --recursive java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
So, is there any simple way to identify all rpm packages which depends on a particular package?
By package , I mean java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
(not java-1.8.0-openjdk-headless
)
centos rhel package-management yum rpm
Linux distribution: Red Hat Enterprise Linux Server release 6.10 (Santiago)
Context:
I need to uninstall all old versions of Java in my server.
I have the list of java paths, example:
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el6_10.x86_64/jre/bin/java
I can find the pacakage owning this file by:
rpm -qf /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el6_10.x86_64/jre/bin/java
java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
Now, how to find all packages depending on java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
, so that I can see whether it is safe to remove the package ?
Below command says no other packages depends on this openjdk package (Ref: Question-166343):
rpm -q --whatrequires java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
no package requires java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
But, mysql-connector-java
depends on this package.
Reason: rpm --whatrequires
option's argument is CAPABILITY provided by a package , not package name and searching using CAPABILITY is not straightforward.
Below command was also not returning any results:
repoquery --requires --resolve --recursive java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
So, is there any simple way to identify all rpm packages which depends on a particular package?
By package , I mean java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64
(not java-1.8.0-openjdk-headless
)
centos rhel package-management yum rpm
centos rhel package-management yum rpm
edited 2 days ago
Jeff Schaller♦
44.3k1162143
44.3k1162143
asked 2 days ago
penguinpenguin
3415
3415
Did you install the java package viayum
?
– Nasir Riley
2 days ago
Yes. Installed via yum.
– penguin
2 days ago
Add the script that you have so far to your question.
– Nasir Riley
2 days ago
I see in other questions the "yum deplist" option; alternatively, you could run a test-remove:yum --assumeno ...
orrpm --test ...
– Jeff Schaller♦
2 days ago
@JeffSchalleryum deplist
would show the packages on which it depends but not what depends on the package itself.
– Nasir Riley
2 days ago
add a comment |
Did you install the java package viayum
?
– Nasir Riley
2 days ago
Yes. Installed via yum.
– penguin
2 days ago
Add the script that you have so far to your question.
– Nasir Riley
2 days ago
I see in other questions the "yum deplist" option; alternatively, you could run a test-remove:yum --assumeno ...
orrpm --test ...
– Jeff Schaller♦
2 days ago
@JeffSchalleryum deplist
would show the packages on which it depends but not what depends on the package itself.
– Nasir Riley
2 days ago
Did you install the java package via
yum
?– Nasir Riley
2 days ago
Did you install the java package via
yum
?– Nasir Riley
2 days ago
Yes. Installed via yum.
– penguin
2 days ago
Yes. Installed via yum.
– penguin
2 days ago
Add the script that you have so far to your question.
– Nasir Riley
2 days ago
Add the script that you have so far to your question.
– Nasir Riley
2 days ago
I see in other questions the "yum deplist" option; alternatively, you could run a test-remove:
yum --assumeno ...
or rpm --test ...
– Jeff Schaller♦
2 days ago
I see in other questions the "yum deplist" option; alternatively, you could run a test-remove:
yum --assumeno ...
or rpm --test ...
– Jeff Schaller♦
2 days ago
@JeffSchaller
yum deplist
would show the packages on which it depends but not what depends on the package itself.– Nasir Riley
2 days ago
@JeffSchaller
yum deplist
would show the packages on which it depends but not what depends on the package itself.– Nasir Riley
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
Try this,
Normally rpm -e
doesn't uninstall a package if there are other packages that are dependent on this package [ of course --nodeps
can be used to by pass this ]. As @JeffSchaller mentioned rpm -e
can also be used in conjunction with --test
to see if there are any error: Failed dependencies:
--test Don’t really uninstall anything, just go through the motions. Useful in conjunction with the -vv option for debugging.
rpm -e -vv <package_name>
-- check for error: Failed dependencies:
or
rpm -e -vv --test <package_name>
-- check for error: Failed dependencies:
For more refer man rpm
An example I used: rpm -e mysql --test -vv 2>&1 | grep 'Failed dependencies'
– penguin
yesterday
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f509103%2frhel-centos-how-can-i-find-all-rpm-packages-which-depends-on-a-particular-pack%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try this,
Normally rpm -e
doesn't uninstall a package if there are other packages that are dependent on this package [ of course --nodeps
can be used to by pass this ]. As @JeffSchaller mentioned rpm -e
can also be used in conjunction with --test
to see if there are any error: Failed dependencies:
--test Don’t really uninstall anything, just go through the motions. Useful in conjunction with the -vv option for debugging.
rpm -e -vv <package_name>
-- check for error: Failed dependencies:
or
rpm -e -vv --test <package_name>
-- check for error: Failed dependencies:
For more refer man rpm
An example I used: rpm -e mysql --test -vv 2>&1 | grep 'Failed dependencies'
– penguin
yesterday
add a comment |
Try this,
Normally rpm -e
doesn't uninstall a package if there are other packages that are dependent on this package [ of course --nodeps
can be used to by pass this ]. As @JeffSchaller mentioned rpm -e
can also be used in conjunction with --test
to see if there are any error: Failed dependencies:
--test Don’t really uninstall anything, just go through the motions. Useful in conjunction with the -vv option for debugging.
rpm -e -vv <package_name>
-- check for error: Failed dependencies:
or
rpm -e -vv --test <package_name>
-- check for error: Failed dependencies:
For more refer man rpm
An example I used: rpm -e mysql --test -vv 2>&1 | grep 'Failed dependencies'
– penguin
yesterday
add a comment |
Try this,
Normally rpm -e
doesn't uninstall a package if there are other packages that are dependent on this package [ of course --nodeps
can be used to by pass this ]. As @JeffSchaller mentioned rpm -e
can also be used in conjunction with --test
to see if there are any error: Failed dependencies:
--test Don’t really uninstall anything, just go through the motions. Useful in conjunction with the -vv option for debugging.
rpm -e -vv <package_name>
-- check for error: Failed dependencies:
or
rpm -e -vv --test <package_name>
-- check for error: Failed dependencies:
For more refer man rpm
Try this,
Normally rpm -e
doesn't uninstall a package if there are other packages that are dependent on this package [ of course --nodeps
can be used to by pass this ]. As @JeffSchaller mentioned rpm -e
can also be used in conjunction with --test
to see if there are any error: Failed dependencies:
--test Don’t really uninstall anything, just go through the motions. Useful in conjunction with the -vv option for debugging.
rpm -e -vv <package_name>
-- check for error: Failed dependencies:
or
rpm -e -vv --test <package_name>
-- check for error: Failed dependencies:
For more refer man rpm
answered yesterday
sai sasankasai sasanka
799311
799311
An example I used: rpm -e mysql --test -vv 2>&1 | grep 'Failed dependencies'
– penguin
yesterday
add a comment |
An example I used: rpm -e mysql --test -vv 2>&1 | grep 'Failed dependencies'
– penguin
yesterday
An example I used: rpm -e mysql --test -vv 2>&1 | grep 'Failed dependencies'
– penguin
yesterday
An example I used: rpm -e mysql --test -vv 2>&1 | grep 'Failed dependencies'
– penguin
yesterday
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f509103%2frhel-centos-how-can-i-find-all-rpm-packages-which-depends-on-a-particular-pack%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you install the java package via
yum
?– Nasir Riley
2 days ago
Yes. Installed via yum.
– penguin
2 days ago
Add the script that you have so far to your question.
– Nasir Riley
2 days ago
I see in other questions the "yum deplist" option; alternatively, you could run a test-remove:
yum --assumeno ...
orrpm --test ...
– Jeff Schaller♦
2 days ago
@JeffSchaller
yum deplist
would show the packages on which it depends but not what depends on the package itself.– Nasir Riley
2 days ago