Another way to get rid of unnecessary packages

Every day solutions to every day challenges. + Brilliant stuff

Moderators: b1o, jkerr82508

Forum rules
Please feel free to post your tip it does not have to be advanced. Also ask questions directly related to the tip here. But do not start new threads with questions or ask for help here. That is what the help section is for. forum rules: http://bjoernvold.com/forum/viewtopic.php?f=8&t=568
User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Another way to get rid of unnecessary packages

Postby dedanna1029 » 05 Dec 2012, 04:53

For those who do not trust the auto-orphans feature of their distro (and I never do), I've found that the *-devel packages are the root space hoggers. I have just got rid of 226 MBs of data from / (root), and went about it in a way that was careful and methodical, but worked, for CentOS 6.2. Keep in mind to run the packaging commands for your particular flavor of Linux:

  • Run "rpm -qa | grep devel"
  • Copy the list of packages that it outputs to a gedit (or kwrite) file
  • Edit the file so that each line word-wraps, for instance the list will come out as a list. You want full lines, with just a space in-between each package (the End and Del key are very handy and fast in this).
  • Copy the list from the file
  • Pull up a terminal, and login to it as root
  • Type in "yum remove " (put in the space), and then paste in the list
  • It will take a while to think. Let the transaction take place, but only up to the point of it asking you if this is OK
  • Scroll through the output thus far, and be sure there are no packages listed that you don't want removed. If there are, then say no in terminal, then go back to the text file, and remove from it the package(s) that is(are) causing the packages that you don't want to be removed to be removed
  • Repeat the process until no more packages will remove that you don't want removed, then give the yes answer to is this OK


This does not take as much time as you think, and cleans out a lot of space!
I hope this makes sense to you. If not, feel free to ask. Really, all the -devel files are for, is to compile programs, with very few exceptions.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

Return to “Tips & Tricks”