Created
February 10, 2014 16:07
-
-
Save dcloud9/8918580 to your computer and use it in GitHub Desktop.
How-to Strip Down Debian Distro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Should be run on a vanilla Debian install. | |
# This script will strip it down to bare minimum and yet bootable distro. | |
# Simulated run onlyi (--simulate). Uncomment this and Comment out the "Real Deal". | |
#apt-get --simulate purge $(dpkg-query -Wf '${Package;-40}${Essential}${Priority}\n'|awk '$2 ~ /nooptional|noextra/ {print $1}'|grep -v -E 'anacron|busybox|initramfs-tools|insserv|klibc-utils|libklibc|libsemanage-common|libsemanage1|libustr-1.0-1|libuuid-perl|linux-base|linux-image') | |
# Real deal. | |
apt-get purge $(dpkg-query -Wf '${Package;-40}${Essential}${Priority}\n'|awk '$2 ~ /nooptional|noextra/ {print $1}'|grep -v -E 'anacron|busybox|initramfs-tools|insserv|klibc-utils|libklibc|libsemanage-common|libsemanage1|libustr-1.0-1|libuuid-perl|linux-base|linux-image') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
roughly how big of an image do you end up with?