On Wed, Jul 8, 2015 at 9:12 PM, William Hermans <
yyr...@gmail.com> wrote:
> So, last night I was bored and got around to toying with debootstrap( again,
> but first time in a while ). I'm curious how you Robert get such a small
> barefs. I have not read your scripts in their entirety, but it stands to
> reason with a little bit of help from google I should be able to get close.
> But this has not been the case so far.
Oh, lots of 'little' things.. ;)
From /usr/ nuke:
/usr/share/locale/*
/usr/share/man/*
/usr/share/doc/*
> 42M lib
> 8.1M boot
> 7.6M var
> 3.6M sbin
> 3.6M bin
> 1.5M etc
> 32K root
> 28K run
> 8.0K dev
>
> What am I missing here ? A couple packages, purgelocales deborphan etc, but
> this seems large for a stripped down debootstrap rootfs. Including modules,
> and kernel.
apt:
(don't store apt cache, this slows things down, but saves lots of space)
cat /etc/apt/apt.conf.d/02nocache
02nocache
Dir::Cache {
srcpkgcache "";
pkgcache "";
}
( similar to apt-get clean, but automatic)
cat /etc/apt/apt.conf.d/02apt-get-clean
#Custom apt-get clean
DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb
/var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true";
};
APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb
/var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true";
};
Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";
(only store compressed indexs)
cat /etc/apt/apt.conf.d/02compress-indexes
Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";
(drop apt translations)
cat /etc/apt/apt.conf.d/02-no-languages
Acquire::Languages "none";
Regards,
--
Robert Nelson
https://rcn-ee.com/