LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Yum erase/remove and uninstall rpm files (http://www.linuxquestions.org/questions/linux-newbie-8/yum-erase-remove-and-uninstall-rpm-files-929289/)

dailyoliver 02-14-2012 08:42 AM

Yum erase/remove and uninstall rpm files
 
Hello everyone I would really appreciate a little bit of advice, so any help would be greatly appreciated.


I have 4 quick questions that involves YUM and rpm files.

1- what is the difference between 'yum erase' and 'yum remove'?

2- when using 'yum remove <package_name>' do you also have to ALSO do ' rpm -e package_name' to remove the rpm file?

3- is it ok (after two previous steps) to delete the original package_name.rpm by doing 'rm -rf /dir/package_name.rpm'

4- do you have to manually delete all the programs folders i.e. for postgresql 'rm -rf /usr/pgsql-9.0@ ??

I am quite confused how you uninstall everything correctly as there seems to be files all over the place, even after running yum remove

a clear explanation would be very much appreciated.

a big thanks - daily oliver...

acid_kewpie 02-14-2012 08:49 AM

1 - nothing.

2 - no.

3 - yes (but the "-r" is pointless as its not a directory)

4 - no. Well... additional configuration files can be left behind, so reinstalling can pick up where it left off, if in doubt, just check, but generally no. It's not like it would be acceptable to delete your data by uninstalling postgresql. It will generally remove what it put there.

John VV 02-14-2012 08:49 AM

sounds a little bit like homework but maybe not

normally only
Code:

su -
yum remove ??????
--- or this ---
yum erase ???????

is just fine
you might want to read the man page
Code:

su -
man yum

for most 99.9% there is no need to remove folders.
UNLESS there are files in them that were NOT installed by the package manager

yum IS used so you do not have to use "rpm" except as a last resort

and never never NEVER use the " -y" option with uninstalling programs

dailyoliver 02-14-2012 08:52 AM

GUYS

What can I say?

Helpful

Professional

and very clear!!!

Thanks a lot - Daily Oliver...

T3RM1NVT0R 02-14-2012 08:52 AM

@ Reply
 
Hello dailyoliver,

Welcome to LQ!!!

Quote:

1- what is the difference between 'yum erase' and 'yum remove'?
1. Both are the same. If you will do man yum you will find that it will list both options as one.

Quote:

]2- when using 'yum remove <package_name>' do you also have to ALSO do ' rpm -e package_name' to remove the rpm file?
2. No, it is not needed. Yum and rpm are two different methods of package management. Yum is a useful tool when you have got repository configured. Yum will automatically resolve the dependecies and will install the package. rpm is usually used when you are trying to install a single rpm file. Remember if you know that the rpm you are trying to install has got dependencies then it is a good idea to incorporate that rpm file in your repository so that you can use yum to resolve the related dependencies for you.

Quote:

3- is it ok (after two previous steps) to delete the original package_name.rpm by doing 'rm -rf /dir/package_name.rpm'
3. Don't get confused between yum and rpm. These are two different methods for package managment. Have a look at the following link to get the information on yum and rpm: http://www.google.co.in/url?sa=t&rct...Rn_yIw&cad=rja

Quote:

4- do you have to manually delete all the programs folders i.e. for postgresql 'rm -rf /usr/pgsql-9.0@ ??
4. As far as I am aware not required.

acid_kewpie 02-14-2012 08:54 AM

John, you su to read manpages??? :confused:

John VV 02-14-2012 11:40 AM

"su- " typing habit


All times are GMT -5. The time now is 09:46 AM.