Ask Your Question
2

How to "completely" remove a software in Fedora?

asked 2013-03-06 00:43:18 -0500

Santosh gravatar image

updated 2013-03-06 04:44:40 -0500

If I were on a debian based system, I would have done these steps to remove a package named firefox:

  • $ dpkg --get-selection *firefox*

to list all the packages which contains firefox in their name. Suppose the above command gave this output:

firefox
firefox-foo
foo-firefox
gnome-firefox-xyz
foo-firefox-bar

Now I would do a:

  • $ sudo apt-get remove firefox firefox-foo foo-firefox gnome-firefox-xyz foo-firefox-bar

to remove the firefox and firefox related package.

Now I would do a:

  • $ sudo dpkg --purge *firefox*

I don't know what this does but it removes the packages from dpkg --get-selection.

  • In next step I would check if there is any file/folder named firefox in /usr/lib/ and /usr/bin/, if so then remove them.

  • Finally I would remove my ~/.mozilla/firefox/ directory.

Last two steps are not going to change on most Linux.

But how do I do that in Fedora or Fedora based systems?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2013-03-06 16:54:35 -0500

jmt gravatar image

The other answers are good, but to get back to your original question:

To list packages containing a word e.g. "firefox":

rpm -qa | grep firefox

I've noticed that I use commands like 'rpm -qa' or 'rpm -qd package' or even 'rpm -ql package' a lot. The first one list all packages, the second one shows the documentation files of a package and the last one shows all the files belonging to a package.

To remove a package, simply enter (as root):

yum remove packagename

A simple alternative to yum history commands is simply taking a look at /var/log/yum.log which shows all the actions done by yum. Especially useful is grepping from that log file e.g.

grep kernel /var/log/yum.log
edit flag offensive delete link more
1

answered 2013-03-06 06:14:31 -0500

hhlp gravatar image

updated 2013-03-06 06:27:47 -0500

The easy way

You can do it all of it with a simple GUI.

Yum Extender is a GUI for the yum packages manager, The goal with the application is to give easy access to many of the powerful features in yum, and manages all the dependencies for you.

sudo yum install yumex

NOTE :

What does the package colors mean ?

Red = Package is a update to a installed package.
Blue = Package is obsoleting a installed package.
Green = Package is installed.
Black = Available package.

image description


SOURCE

The hard way

yum-plugin-remove-with-leaves

This extension removes unused dependencies which have been incorporated by an installation package that would otherwise not be removed. Helps maintain a system clean of libraries and unused packages.

This extension adds the following options to the remove command:

 --leaves-exclude-bin
    Do not remove leaf packages containing executable binaries. 
 --remove-leaves
    Removes unneeded dependencies for other packages.

Instalation :

sudo yum install yum-plugin-remove-with-leaves

How it works :

sudo yum erase `packaged (write your package here without quotes)` --remove-leaves
edit flag offensive delete link more

Comments

The yum plugin is completely unnecessary at this point. Just set cleanrequirementson_remove=1 in /etc/yum.conf

mether gravatar imagemether ( 2013-03-06 11:26:11 -0500 )edit
2

answered 2013-03-06 05:54:59 -0500

Jomoos gravatar image

Well, as you may know, Fedora's package management tool is Yum (Yellowdog Update Modified). It has lots of facilities, and one which will be of interest to you is it's transaction history management.

From Redhat's documentation

The yum history command allows users to review information about a timeline of Yum transactions, the dates and times they occurred, the number of packages affected, whether transactions succeeded or were aborted, and if the RPM database was changed between transactions. Additionally, this command can be used to undo or redo certain transactions.

Some commands of interest are:

  • yum history lists all latest yum operations
  • yum history list list all operations or just selected package operations.
  • yum history info shows full information by history ID.
  • yum history undo simply undo operations by history ID.
  • yum history redo simply redos operation from yum history by ID.

So, you can first find out the installation operations ID using yum history and then undo it with yum history undo.

References:

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-06 00:43:18 -0500

Seen: 42,111 times

Last updated: Mar 06 '13