Issue
So I installed Python 3.7 on my EC2 Fedora instance with Yum, later I needed to remove it. However, when I did yum -list, it showed all the "sub-packages" installed with python.
I just typed yum remove python3 and it worked, but what is the "proper" way of figuring out what name you need to type to remove a package cleaningly?
Solution
Your question is not very clear, but I'll try to answer.
1. You installed python3.7 your self
when you installed python3.7, you typed
yum install python3
so if you want to remove it, you can type the same name that you use to install it:
yum remove python3
2. someone else installed it
In this case you can trace the binary that you want to remove, let's say python3.7
. First you can see what is the full path of that binary:
which python3.7
which gives
/usr/bin/python3.7
now you can query which package installed that file:
rpm -qf /usr/bin/python3.7
which will yield the full package name, something like:
python36-3.6.8-2.module_el8.0.0+33+0a10c0e1.x86_64
which you can then use to remove it:
yum remove python36-3.6.8-2.module_el8.0.0+33+0a10c0e1.x86_64
Answered By - Chris Maes Answer Checked By - Cary Denson (WPSolving Admin)