LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-27-2012, 07:34 PM   #1
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
/var/cache/yum and /var/lib/rpm getting BIG. How to safely pare down?


I'm getting directories -- GROWING directories that I want to pare down if I can do so safely. I have Fedora 16 64 bit and it's using 7.0gb of space. /var/cache/yum and /var/lib/rpm are using 223mb and 125mb respectively and growing. My HDD is 14gb total. I know, I'm old and paranoid and probably shouldn't worry about it but I came through an age when 120mb HDDs were relatively large and I constantly cleaned stuff out just to keep the drive with plenty of space. Old habits die hard. I hope to clear out some other stuff after this if I can find it. Thanks ahead of time.
 
Old 02-27-2012, 11:49 PM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

If you want to clean out 'old' yum data you can just run:
Code:
yum clean all
That'll delete all downloaded packages from previous installations. It doesn't affect your installation, just cleans up the cache by deleting all downloaded packages. The /var/lib/rpm contains the RPM database and info so I advice you not to mess with it. That database holds all information the RPM command has about your system, installed packages, etc...

Kind regards,

Eric
 
Old 02-28-2012, 07:12 PM   #3
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Original Poster
Rep: Reputation: 91
Quote:
Originally Posted by EricTRA View Post
Hello,

If you want to clean out 'old' yum data you can just run:
Code:
yum clean all
That'll delete all downloaded packages from previous installations. It doesn't affect your installation, just cleans up the cache by deleting all downloaded packages. The /var/lib/rpm contains the RPM database and info so I advice you not to mess with it. That database holds all information the RPM command has about your system, installed packages, etc...

Kind regards,

Eric
Okay thanks a lot. Does "yum clean all" delete /var/lib/rpm?
 
Old 02-29-2012, 01:17 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

AFAIK it doesn't do anything with the rpm database, it only removes packages, headers, metadata and cleans out the sqlite database that yum uses. Have a look at the man page for yum for more detailed information. That for the yum part. If you want to 'clean up' your rpm database to make sure no 'old' references might be hanging around you can follow the following procedure:

- Move the existing database files /var/lib/rpm/_db* to another location for backup
- run the command:
Code:
rpm --rebuilddb
But under normal circumstances the rpm database occupies very little space and unless your having issues with the rpm related commands and assume a database corruption, there is no need at all to perform the above actions. After all 125 Mb is not large at all nowadays.

Kind regards,

Eric
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /var/lib/amavis dir becoming big farooklk Linux - Server 2 08-16-2011 01:32 AM
fedora 12 `yum update -y` & ran out of space in my /var/yum/cache/directory. techknowtarded Linux - Newbie 7 08-13-2011 07:23 PM
Can I just delete my /var/cache/yum folder? SquishyMarbles Linux - Software 1 04-10-2006 03:25 PM
Yum Problem - /var/cache/yum/base/primary.xml.gz:1 ice99 Linux - Software 0 12-15-2005 01:08 PM
Error: Caching enabled and local cache: //var/cache/yum/base/primary.xml.gz does... dr_zayus69 Linux - Software 2 07-06-2005 04:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:13 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
Open Source Consulting | Domain Registration