LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 01-06-2009, 04:57 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 48
Importance and use of these files


Hi,

I am using Debian Lenny and I am trying to make Debian system as lean as possible by removing all the unnecessary packages. So far I have been able to make my Debian system 210MB in size. Now using "du" utility I found the following files which seems to be quite large:
Code:
  • /var/lib/apt/lists/mirrors.kernel.org_debian_dists_testing_main_binary-i386_Packages - Around 24 MB
  • /var/lib/dpkg/available - Around 24 MB
  • /var/cache/apt/pkgcache.bin - 9 MB
  • /var/cache/apt/srcpkgcache.bin - 9 MB
Now based on my research I have found that it is not dangerous/fatal to remove the above files from the system because "apt-get update" will re-create those if they are missing.

Now I was wondering that if I can somehow compress these files or make these files disappear somehow I can get around 60 MB of free space. However I do understand that these files might be require every time whenever "apt-get" gets called.

Can anyone shed some light on these files and give some idea as to how can I avoid using these (or at least some of these) files without breaking the Debian package management system?

Last edited by kushalkoolwal; 01-06-2009 at 05:19 PM.
 
Old 01-07-2009, 12:27 PM   #2
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 20; Arch; Kubuntu; Debian
Posts: 710

Rep: Reputation: 31
How small is your hard drive? I wouldn't muck about with the package management files for no reason.
 
Old 01-07-2009, 12:31 PM   #3
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 DJOtaku View Post
How small is your hard drive? I wouldn't muck about with the package management files for no reason.
I am working on an embedded system and I am trying to make Debian fit on it. I have around 150 MB of space.
 
Old 01-07-2009, 12:34 PM   #4
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 20; Arch; Kubuntu; Debian
Posts: 710

Rep: Reputation: 31
Well, you could make a non-updatable Debian system. q;o)

I'd be really surprised if someone hadn't done this already.

Also, check out monowall. It's FreeBSD-based, but it fits on like 32 MB or so.
 
Old 01-07-2009, 12:37 PM   #5
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 DJOtaku View Post
Well, you could make a non-updatable Debian system. q;o)
Yes, that struck my mind too. If I am not able to find any other solution than I will probably make it non-update system although I would prefer to have an option which can let me update the system...

I'd be really surprised if someone hadn't done this already.

Quote:
Originally Posted by DJOtaku View Post
Also, check out monowall. It's FreeBSD-based, but it fits on like 32 MB or so.
Using anything else other than Debian is not an option.
 
Old 01-07-2009, 12:46 PM   #6
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 20; Arch; Kubuntu; Debian
Posts: 710

Rep: Reputation: 31
Aha! Why not use Damn Small Linux? How big is it when installed?
 
Old 01-07-2009, 01:04 PM   #7
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
OUt of curiosity would you post the list of packages in your 'stripped' Debian ? maybe someone here will spot other items that are not necessary.

I also run localepurge on my Debian boxes to remove man pages for languages I do not read.. this is handled automatically and does save a bit of space.

A custom kernel could also save you space.. strip out the items you do not need for your system when compiling.

Last edited by farslayer; 01-07-2009 at 01:05 PM.
 
Old 01-07-2009, 01:23 PM   #8
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
[QUOTE=farslayer;3400181]OUt of curiosity would you post the list of packages in your 'stripped' Debian ? maybe someone here will spot other items that are not necessary. [QUOTE=farslayer;3400181]

Thank you first of all for the your offer to help me out.

Sure here is the list. Note that there are some packages like usbmount, wireless-tools, cpp, etc. that I understand are option but I need them in my system. I have marked those packages with Green color.
Code:
adduser						install
apt						install
apt-utils					install
aptitude					install
autofs						install
base-files					install
base-passwd					install
bash						install
bc						install
belocs-locales-bin				install
belocs-locales-data				install
binutils					install
bsdmainutils					install
bsdutils					install
bzip2						install
coreutils					install
cpio						install
cpp						install
cpp-4.3						install
cron						install
debconf						install
debconf-i18n					install
debfoster					install
debian-archive-keyring				install
debianutils					install
deborphan					install
dhcp3-client					install
dhcp3-common					install
dialog						install
diff						install
dmidecode					install
dpkg						install
dselect						install
e2fslibs					install
e2fsprogs					install
ed						install
eject						install
fdutils						install
findutils					install
ftp						install
gcc						install
gcc-4.3						install
gcc-4.3-base					install
gettext-base					install
gnupg						install
gpgv						install
grep						install
groff-base					install
grub						install
grub-common					install
gzip						install
hdparm						install
hostname					install
hwinfo						install
ifupdown					install
info						install
initscripts					install
iputils-ping					install
klogd						install
less						install
libacl1						install
libattr1					install
libblkid1					install
libbz2-1.0					install
libc6						install
libcomerr2					install
libcwidget3					install
libdb4.6					install
libdbus-1-3					install
libdevmapper1.02.1				install
libedit2					install
libept0						install
libgc1c2					install
libgcc1						install
libgdbm3					install
libgmp3c2					install
libgomp1					install
libgpm2						install
libhal-storage1					install
libhal1						install
libhd14						install
libiw29						install
libkeyutils1					install
libkrb53					install
liblocale-gettext-perl				install
liblockfile1					install
libmpfr1ldbl					install
libncurses5					install
libncursesw5					install
libnewt0.52					install
libpam-modules					install
libpam-runtime					install
libpam0g					install
libpci3						install
libpng12-0					install
libpopt0					install
libreadline5					install
libselinux1					install
libsensors4					install
libsepol1					install
libsigc++-2.0-0c2a				install
libslang2					install
libss2						install
libssl0.9.8					install
libstdc++6					install
libsysfs2					install
libtext-charwidth-perl				install
libtext-iconv-perl				install
libtext-wrapi18n-perl				install
libusb-0.1-4					install
libuuid1					install
libvolume-id0					install
libwrap0					install
libxapian15					install
links						install
linux-image-2.6.26-test1			install
lm-sensors					install
localepurge					install
locate						install
lockfile-progs					install
login						install
logrotate					install
lsb-base					install
lsof						install
lzma						install
make						install
makedev						install
man-db						install
manpages					install
mawk						install
mdetect						install
minicom						install
mktemp						install
module-init-tools				install
mount						install
nano						install
ncurses-base					install
ncurses-bin					install
net-tools					install
netbase						install
netcat						install
netcat-traditional				install
openssh-blacklist				install
openssh-client					install
openssh-server					install
passwd						install
pciutils					install
pcmciautils					install
perl						install
perl-base					install
perl-modules					install
pmount						install
procps						install
psmisc						install
readline-common					install
sed						install
setserial					install
ssh						install
sysklogd					install
sysv-rc						install
sysvinit					install
sysvinit-utils					install
tar						install
tcpd						install
telnet						install
tzdata						purge
ucf						install
udev						install
update-inetd					install
usbmount					install
usbutils					install
util-linux					install
watchdog					install
wget						install
whiptail					install
wireless-tools					install
xinetd						install
zlib1g						install
Also here is a list which shows the install size of the above packages which has been very useful for me to single out the bloated ones.
Code:
28 libtext-wrapi18n-perl
36 libattr1
36 libtext-charwidth-perl
36 netcat
40 mdetect
44 libtext-iconv-perl
44 ssh
48 libacl1
52 liblockfile1
56 debian-archive-keyring
56 libkeyutils1
60 libgomp1
60 libgpm2
60 libiw29
60 mktemp
64 gcc
64 libusb-0.1-4
64 libxau6
68 libxcb-xlib0
68 lockfile-progs
72 cpp
72 hwinfo
72 lsb-base
76 libxdmcp6
80 libgdbm3
80 libpci3
80 libsplashy1
84 hostname
84 pcmciautils
84 readline-common
88 libgcc1
88 libsigc++-2.0-0c2a
92 libbz2-1.0
92 logrotate
96 ed
96 libcomerr2
96 libwrap0
96 netbase
96 whiptail
104 liblocale-gettext-perl
104 libss2
108 ftp
108 libts-0.0-0
108 setserial
112 debfoster
112 libsysfs2
112 libuuid1
116 usbmount
120 iputils-ping
120 update-inetd
124 bzip2
124 libblkid1
124 libxext6
124 lzma
128 zlib1g
136 klogd
136 libdevmapper1.02.1
140 libvolume-id0
144 ifupdown
144 telnet
148 libedit2
148 libselinux1
148 makedev
156 localepurge
160 gcc-4.3-base
160 libsensors4
160 libxcb1
164 bsdutils
168 dmidecode
172 sysvinit-utils
184 base-passwd
192 libpopt0
192 netcat-traditional
196 bc
204 libpam0g
212 sysklogd
212 tcpd
216 libgc1c2
224 less
224 mawk
252 libsepol1
256 ucf
256 wireless-tools
260 sysv-rc
264 base-files
268 hdparm
272 debianutils
272 deborphan
276 grub-common
276 libreadline5
276 sysvinit
276 watchdog
284 e2fslibs
284 gzip
288 libpng12-0
288 module-init-tools
296 gpgv
304 xinetd
312 eject
312 mount
324 locate
340 libdbus-1-3
352 info
356 libpcre3
372 apt-utils
388 autofs
388 initscripts
412 initramfs-tools
420 lsof
448 usbutils
460 lm-sensors
476 cpio
480 ncurses-bin
484 libgmp3c2
484 ncurses-base
488 libmpfr1ldbl
492 belocs-locales-bin
492 pmount
492 psmisc
520 libhal-storage1
540 cron
552 dhcp3-common
552 libhal1
572 dhcp3-client
584 libncurses5
608 bsdmainutils
608 gettext-base
624 libncursesw5
628 sed
640 libfreetype6
668 procps
696 pciutils
744 diff
760 grub
772 openssh-server
804 libpam-modules
804 udev
820 libnewt0.52
820 net-tools
828 libcwidget3
896 x11-common
924 fdutils
944 adduser
952 libpam-runtime
968 make
972 manpages
1100 debconf-i18n
1104 bash
1104 libslang2
1116 links
1124 libkrb53
1144 minicom
1168 libstdc++6
1180 grep
1240 libx11-6
1248 libdb4.6
1348 dialog
1508 debconf
1512 findutils
1568 wget
1620 libxapian15
1624 util-linux
1716 nano
1720 libglib2.0-0
1776 libhd14
1956 openssh-client
1960 e2fsprogs
2108 passwd
2140 libdirectfb-1.0-0
2164 dselect
2224 tar
2392 login
2412 libmagic1
2504 groff-base
2580 man-db
3948 libept0
4089 perl-base
4092 openssh-blacklist
4556 apt
4560 gcc-4.3
4888 gnupg
6268 tzdata
6712 libssl0.9.8
7244 dpkg
7528 cpp-4.3
7536 binutils
9648 aptitude
10032 coreutils
10180 belocs-locales-data
10508 libc6
12928 perl
13228 linux-image-2.6.26-ebx12-test1
13972 perl-modules
Quote:
Originally Posted by farslayer View Post
I also run localepurge on my Debian boxes to remove man pages for languages I do not read.. this is handled automatically and does save a bit of space.

A custom kernel could also save you space.. strip out the items you do not need for your system when compiling.
Already done that. debfoster, localepurge, deborphan, custom kernel, etc.

Any help in reducing the size even by few MB would be a step in forward direction at this point of time.
 
Old 01-07-2009, 03:12 PM   #9
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
I'm surprised that you would have gcc and things for compiling on what would be an embedded system..
Wouldn't you do any necessary compiling on another box, then copy your compiled modules / apps over to the embedded system ?

pcmciautils - Is there actually a PCMCIA slot on the embedded system ?

locate --- database of the directories on your system.. not needed if you can wait for find when searching. you also have the size of hte database, and overhead of the indexing

manpages - why bother with manual pages at all on an embedded system, look em up online
man-db - same reason
info - Documentation viewer
netcat nifty network utility for doing interesting things..
minicom - serial communications program

libfreetype - Font engine shared library files.. I don't see X anywhere shouldn't need this.

links - text based web browser..

fdutils - please tell me there isn't a floppy drive on your embedded machine..


ed / nano both are editors one of then could go..

Of course I don't know the purpose of your device, so...

I should throw a disclaimer here as well.. in case removal of one of these breaks the system.. so count yourself notified.. but I don't think anything I've listed would be an issue.

Last edited by farslayer; 01-07-2009 at 03:42 PM.
 
Old 01-07-2009, 03:19 PM   #10
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 farslayer View Post
I'm surprised that you would have gcc and things for compiling on what would be an embedded system..

Wouldn't you do any necessary compiling on another box, then copy your compiled modules / apps over to the embedded system ?
Yes I agree but this is an exception in this case. Also let's say I remove it, can you suggest removal of any other packages that might further free up some space.

Quote:
Originally Posted by farslayer View Post
Is there actually a PCMCIA slot on the embedded system ?
Yes, you can add-on a PCMCIA card to plug your wireless-card.
 
Old 01-07-2009, 03:43 PM   #11
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
theres a brief list.. just edited the previous post.. bumping to send notification
 
Old 01-07-2009, 03:46 PM   #12
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 241

Rep: Reputation: 45
Could you remove aptitude (9648 Kb) and make do with apt-get?

Edit: And dselect (2164 Kb) could be removed.

Last edited by norobro; 01-07-2009 at 05:44 PM.
 
  


Reply

Tags
debian, embedded, system


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
locale directory importance ?? culin Linux - General 1 11-20-2007 01:45 PM
LXer: Importance of Community in FOSS LXer Syndicated Linux News 0 10-12-2007 08:00 AM
LXer: The Increasing Importance of Community LXer Syndicated Linux News 0 05-03-2006 12:33 PM
Importance of GCJ vs. JDK piggysmile Programming 2 04-12-2006 11:27 AM
Importance of IT certifications rbr28 Linux - Certification 3 04-06-2004 05:16 PM


All times are GMT -5. The time now is 11:09 AM.

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