13. Backup and Cleanup

13.1. Remove Unecessary Files

Well we have this system finished, we can make it smaller by removing files that are not necessary for our build. On this page we remove the bloat from our build.

Now lets create a backup of our build:

install -dv ${CLFS}-final
cp -arv ${CLFS}/* ${CLFS}-final/

Lets remove the files we don't need anymore:

rm -rfv ${CLFS}-final/cross-tools
rm -rfv ${CLFS}-final/usr/src/*
rm -rfv ${CLFS}-final/usr/include
rm -rfv ${CLFS}-final/usr/man 
rm -rfv ${CLFS}-final/usr/share/man

Lets remove the static libaries:

FILES="`ls ${CLFS}-final/lib/*.a ${CLFS}-final/usr/lib/*.a`"
for file in $FILES; do
        rm -fv $file
done