Making linaro-nano smaller or Give Up Disk Space for Lent
Dave Martin
dave.martin at linaro.org
Fri Mar 11 11:08:57 UTC 2011
On Thu, Mar 10, 2011 at 4:43 PM, Loïc Minier <loic.minier at linaro.org> wrote:
> On Wed, Mar 09, 2011, Tom Gall wrote:
>> Specifically from the installed image after the hwpack deps are
>> installed get rid of the following:
>> rm -f ./var/lib/apt/lists/*Packages
>> rm -f ./var/lib/apt/lists/*Sources
>> rm -f ./var/lib/apt/lists/*Release
>> rm -f ./var/lib/apt/lists/*Release.gpg
>> rm -f ./var/cache/apt/pkgcache.bin
>> rm -f ./var/cache/apt/srcpkgcache.bin
>
> I think there is a way for APT to keep compressed versions of these
> files; it's the Acquire::GzipIndexes option
There are some possible disadvantages with this:
a) there may be a speed / memory overhead for some operations which
need to access the lists
b) doesn't reduce the size of the (compressed) tarball / cramfs / ramdisk image
If we don't mind a packager performance hit (probably acceptable for
an explicitly footprint-conscious image such as nano), then an
additional option is to disable the apt cache, which contains yet
another (uncompressed) copy of the information in the package lists.
A slower packager is still much more use than no packager.
apt.conf(5) says:
"Dir::Cache contains locations pertaining to local cache information,
such as the two package caches srcpkgcache and pkgcache as well as the
location to place downloaded archives, Dir::Cache::archives. Generation
of caches can be turned off by setting their names to be blank. This
will slow down startup but save disk space. It is probably preferred to
turn off the pkgcache rather than the srcpkgcache. Like Dir::State the
default directory is contained in Dir::Cache"
/var/lib/dpkg/info is often pretty big too; if there was a way to keep
this compressed and/or remove certain files, that could be
interesting.
Cheers
---Dave
>
> --
> Loïc Minier
>
> _______________________________________________
> linaro-dev mailing list
> linaro-dev at lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>
More information about the linaro-dev
mailing list