LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-07-2007, 04:13 PM   #1
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Determining if unneeded packages are installed?


I like, and try, to keep a clean system.

I know I can use yum to list my installed packages. Is there an easy, fast method for cleaning up packages that are irrelevant, such as extra packages that I don't use, and that are not requirements for other packages?

As an example, I don't know what yelp is, so I know I don't directly use it.
 
Old 04-07-2007, 04:43 PM   #2
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Rep: Reputation: 32
Quote:
Originally Posted by SlowCoder
Is there an easy, fast method for cleaning up packages that are irrelevant, such as extra packages that I don't use, and that are not requirements for other packages?
Utimately, only _you_ know what you don't use. Look at manpages to determine program functions. The RPMOrphan application can sort packages by incremental access times to identify probable candidates.

# rpmorphan --all --access-time 15

That will list the orphaned packages unused since 15 days or more.

Last edited by Xian; 04-07-2007 at 04:45 PM.
 
Old 04-07-2007, 04:58 PM   #3
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Original Poster
Rep: Reputation: 38
Thanks for that info. Is 'orphan' the term used for packages that are dependencies for others that have been removed?
 
Old 04-07-2007, 05:15 PM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 83
Yes, "orphan" means that no other package depends on it. For example, suppose that you installed the xyz application, which in turns requires the abc package. If you uninstalled xyz just by itself, then the abc package would still remain on your system, but nothing would be using it, so it's just taking up space, and similarly it could be safely deleted.

However, as far as your original question, as already mentioned, what is considered 'irrelevant' or 'unused' would vary from one person to another, and there are no hard and fast rules. As a very general comment though, if your distro has installed a particular package, there's a reason for it. Personally, I would be very hesitant about arbitrarily removing packages simply on the basis of not recognizing their names, and I would warn that if you plan to move forward there is a chance you could negatively impact your system. Keeping a clean system is an excellent idea, but I would recommend that you research each package's purpose/function before getting rid of it...
 
Old 04-07-2007, 06:53 PM   #5
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by J.W.
Personally, I would be very hesitant about arbitrarily removing packages simply on the basis of not recognizing their names, and I would warn that if you plan to move forward there is a chance you could negatively impact your system. Keeping a clean system is an excellent idea, but I would recommend that you research each package's purpose/function before getting rid of it...
I most definately agree with you on this. I was just hoping that there was an easy way to determine which packages were orphaned and unused, and could safely be removed.

For instance, when I yum installed one application, it did install about 5 dependencies, of which I don't have a list. I removed the application, but I know that did not remove the dependencies.
 
Old 04-07-2007, 06:54 PM   #6
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Original Poster
Rep: Reputation: 38
Another, related question:
When a package is removed, are conf files removed also?
 
Old 04-11-2007, 04:51 AM   #7
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Rep: Reputation: 32
Quote:
Originally Posted by SlowCoder
Another, related question:
When a package is removed, are conf files removed also?
Generally, the config files in the /etc directory are not removed.
 
Old 04-11-2007, 08:21 AM   #8
rufius
Member
 
Registered: Oct 2002
Location: Miami, FL
Distribution: Ubuntu
Posts: 184

Rep: Reputation: 30
Out of curiosity, if the program isn't taking space and isn't being used, why remove it? You may need it later and not have access to reinstall it. Just a thought, I figure space is cheap, why worry?
 
Old 04-11-2007, 08:28 AM   #9
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by rufius
Out of curiosity, if the program isn't taking space and isn't being used, why remove it? You may need it later and not have access to reinstall it. Just a thought, I figure space is cheap, why worry?
Clutter. That's like asking why you would get rid of your kid's toys when they've long stopped playing with them.
 
Old 04-11-2007, 09:13 AM   #10
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
For info, debian keeps track of which package is installed as a dependency and which ones were explicitly installed.
So it will remove dependency packages for which no manually-installed package depends.

On my system, everything is automatically removed.

This ONLY works if you only play with packages. If you have installed from source, then this automatic mechanism will break things.
The solution is to always create a package from a source you want to install.
On Fedora you have to do it because less binaries are packed.
 
Old 04-11-2007, 12:21 PM   #11
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Rep: Reputation: 32
Quote:
Originally Posted by rufius
You may need it later and not have access to reinstall it.
And that's why the default is to leave them behind. You can easily command rpm to output those file before you remove the package and then delete them yourself if this is a concern. Or you can option rpm during reinstallation to write over those same files if you prefer the native configuration. It's completely up to the user, but there is no harm in leaving the previously touched configs around...just handle it however you wish.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to save a list of installed packages and install these packages later mandavi Ubuntu 5 09-07-2009 12:36 PM
script determining if a program is installed ChrisScott Programming 2 02-08-2007 05:41 PM
cleaning up my system of unneeded packages with apt-get Michael_aust Debian 13 04-04-2006 03:23 AM
Sort installed packages by # of dependant packages installed brianez21 Debian 1 01-18-2006 06:06 PM
RPM is saying installed packages aren't installed ticky87 Linux - Newbie 4 07-26-2004 02:17 AM


All times are GMT -5. The time now is 01:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration