LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 05-03-2007, 07:45 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 48
Files in /var/lib/dpkg directory


Hi, I did an ls on the directory /var/lib/dpkg:

and I saw some files like available-old, diversions-old, status-old and statoverride-old.

I was looking to free up some space on my hard drive so I was thinking if it is safe to delete these files?

Thanks
 
Old 05-03-2007, 08:47 PM   #2
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,067

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
On my system, these files were updated recently, and both file and file-old are the same size and probably equal.

I would not mess with it, one mistake and you have precluded any future maintenance using the packaging system. The size of those files is not worth it.

If you want to save space, use "apt-get clean". It will delete old .deb files in a safe way. That space saving is much more significant.

jlinkels
 
Old 05-03-2007, 09:05 PM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 63
Quote:
Originally Posted by kushalkoolwal
Hi, I did an ls on the directory /var/lib/dpkg:

and I saw some files like available-old, diversions-old, status-old and statoverride-old.

I was looking to free up some space on my hard drive so I was thinking if it is safe to delete these files?

Thanks
Don't delete those files if the dpkg/apt database every gets messed up then you will need them to restore from the backups. In addition to the clean option mentioned install localepurge and tell it to get the man pages as well as the locales you do not need. Also installing/running deborphan and debfoster to get rid of packages that have been installed but are no longer needed plus if the machine is not on very early in the morning (around 04:30 IIRC) then install anacron so that your cron jobs will be run to rotate then delete the log files as necessary.
 
Old 05-04-2007, 02:05 PM   #4
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by HappyTux
Don't delete those files if the dpkg/apt database every gets messed up then you will need them to restore from the backups. In addition to the clean option mentioned install localepurge and tell it to get the man pages as well as the locales you do not need. Also installing/running deborphan and debfoster to get rid of packages that have been installed but are no longer needed plus if the machine is not on very early in the morning (around 04:30 IIRC) then install anacron so that your cron jobs will be run to rotate then delete the log files as necessary.

Thanks HappyTux. Actually I have already done all the things that you mentioned i.e. localepurge,orphaner, apt-get clean,etc and then when I still needed some space, I thought how about if I delete those file as they seem to give 20-25MB of free space.

Also, do these files get generated automatically? Suppose, if I remove them will they be re-generated again after some point of time?

Is there any other thing that I can remove?

Thanks

Last edited by kushalkoolwal; 05-04-2007 at 02:11 PM.
 
  


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
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) phreakshew Linux - Newbie 16 02-15-2012 12:28 PM
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 17 12-01-2011 09:24 AM
dpkg is dead! error in /var/lib/dpkg/available dezert_fox Debian 4 11-22-2011 10:28 AM
Unable to lock the administration directory (/var/lib/dpkg/) cccc Debian 10 11-15-2011 10:51 PM
Could not get lock /var/lib/dpkg/lock thelonius Debian 5 07-31-2006 07:48 PM


All times are GMT -5. The time now is 05:55 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration