diff --git a/bootstrap/playbooks/files/minimize.sh b/bootstrap/playbooks/files/minimize.sh index 92460e79..103d428b 100644 --- a/bootstrap/playbooks/files/minimize.sh +++ b/bootstrap/playbooks/files/minimize.sh @@ -22,7 +22,12 @@ apt-get -y clean echo "==> Removing man pages" rm -rf /usr/share/man/* -echo "==> Removing anything in /usr/src" +echo "==> Removing anything in /usr/src but this kernel src" +p2=$(uname -r | cut -d- -f1-2) +mv "/usr/src/linux-headers-${p2}" /tmp +mv /usr/src/linux-headers-$(uname -r) /tmp rm -rf /usr/src/* +mv "/tmp/linux-headers-${p2}" /usr/src/ +mv /tmp/linux-headers-$(uname -r) /usr/src/ echo "==> Removing any docs" rm -rf /usr/share/doc/*