[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Reducing disk space on Grip



Hi,

yesterday I installed Grip/Lenny using debootstrap and noticed some ways
to reduce disk space.  Part of these things might already be done when
Grip/Sid is installed or multistrap is used, others definitely are not.

  * Provide debconf-english and install it by default.

    debconf depends on debconf-i18n or debconf-english but only the
    former is available.  In Grip Both packages are empty but
    debconf-i18n depends on liblocale-gettext-perl, libtext-iconv-perl,
    libtext-wrapi18n-perl and libtext-charwidth-perl.  Removing these
    useless dependencies saves 135kB disk space (or 94.2kB if you have
    tasksel installed).

  * Disable apt's cache.

    The size of /var/cache/apt/pkgcache.bin and srcpkgcache.bin is more
    than one MB with only Grip/Lenny in the sources.list and even more
    with additional entries.  The advantage of keeping this cache would
    be a faster startup of apt.

    A file /etc/apt/apt.conf.d/99nocache-emdebian with the content
    'Dir "/" { Cache "var/cache/apt/" { srcpkgcache ""; pkgcache ""; } }'
    is sufficient to disable this cache.  Since apt can't remove what it
    does not know about rm -f /var/cache/apt/{src,}pkgcache.bin must be
    run once to delete old cache files.

  * Don't install man-db and groff-base by default.

    Installing a tool to read man pages seems to be rather pointless if
    there are no man pages per default.  Purging man-db, groff-base and
    libgdbm3 saved me 3305kB disk space.

  * Don't install orphaned libraries.

    I found eight orphaned libraries: libsysfs2, liblzo2-2, libsasl2-2,
    libgnutls26, libpcre3, libgcrypt11, libtasn1-3 and libgpg-error0.
    Purging these packages saved 1987kB disk space.

    Providing deborphan and/or debfoster (one depends only on libc6, the
    other additionally depends on libgc1c2) in the archive would make it
    easier for users to find such orphaned libraries.

After running apt-get clean && apt-get update in the newly created
Grip/Lenny chroot "du -sbx /" printed 66524376, after these simple
optimizations it printed 60655071.  Of course it would be easy to
further reduce the size of the chroot, but the most obvious ways are
removing packages that are usable without installing additional ones.

One could argue that the package selection is way better when multistrap
is used instead of debootstrap (I don't know if it is, but I guess so);
I think that it should be as easy as possible for people to do their
first steps in emdebian and to accomplish impressive results (that's one
reason Ubuntu runs on so many Desktops) and if this is achievable just
by overwriting some package priorities it should be worth the effort.
Satisfied users will happily read multistrap(8) when they want to dig
deeper, requiring them to read it to do their first cut will prevent
many from becoming users.


Regards
Carsten


Reply to: