LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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: 49
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
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
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: 49
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 24 04-12-2019 10:42 AM
Unable to lock the administration directory (/var/lib/dpkg/) cccc Debian 11 12-05-2017 08:33 PM
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 16 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
Could not get lock /var/lib/dpkg/lock thelonius Debian 5 07-31-2006 07:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:41 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