rm -rf /var/log/*
Would you not be better to just truncate the files in /var/log?
 for name in /var/log/* ; do cat </dev/null >/$name ; done

Alex Owen

On 06/03/07, Hadar <[EMAIL PROTECTED]> wrote:
Hi all,

I made some more minimizations to debian-live using the mini hook.
The mini flavor with default kernel now takes only 37MB and with networking
43MB

Here's the content of the file:

# /usr/share/make-live/hooks/mini - hook list for make-live(8)

# Remove unused packages
apt-get remove --purge --yes apt-utils libdb4.4 aptitude live-package casper

# Remove unused files
rm -rf /usr/share/doc/*
rm -rf /usr/share/locale/*
rm -rf /usr/share/man/*
rm -rf /usr/share/i18n/*
rm -rf /usr/share/info/*
rm -rf /var/log/*
rm -rf /var/lib/apt/lists/*
rm -rf /var/cache/apt/
mkdir -p /var/cache/apt/archives/partial
rm -rf /var/lib/apt/lists
mkdir -p /var/lib/apt/lists/partial

I still don't know the full consequences of these file removes, nor made
thorough tests, but it seems to work ;)
The only problematic removal is rm -rf /var/log/* that should be less
aggressive...

Notes:
* The hook removes aptitude which make-live uses. I patched make-live to use
apt-get instead of aptitude.
* This hook can be used with other flavors using "make-live --hook mini"
* Baobab is a great tool for finding big directories :)
* Another quite big directory is /usr/share/zoneinfo... safe to remove or at
least part of it?
* Improvements are most welcome...

Cheers,
Hadar


_______________________________________________
Debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel


_______________________________________________
Debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Reply via email to