How to reduce (or optimize) size of recently built LFS?

169 Views Asked by At

As the title shows, I've recently built an LFS (version 8.3), with jhalfs. So with du -h, the size of the whole partition is about 4.5 GB (I've already deleted all the files in /sources).

Executing this command that shows what are the big files in the system : du -a / | sort -n -r | head -n 10 , shows this result :

Screenshot

Does anyone know how can I optimize and reduce my partition (what files / packages /or repertories to erase) without breaking the OS ? The goal is reaching an operating system that turns around 400 or 300 MB. Thank you

1

There are 1 best solutions below

0
Ruslan On

Aside from removing /tools and maybe also docs (/usr/share/doc, /usr/share/man) you can also strip debugging symbols from all the libraries and executables. This is done using strip(1) utility; detailed instructions can be found in the LFS book, section "Stripping Again".