Implement -D option to set configuration directory; fai.conf: don't set variables...
[grml-live.git] / etc / grml / fai / config / scripts / DEBORPHAN / 98-clean-chroot
1 #!/bin/bash
2 # Filename:      ${GRML_FAI_CONFIG}/config/scripts/DEBORPHAN/98-clean-chroot
3 # Purpose:       drop as many packages from grml as possible
4 # Authors:       (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2.
7 ################################################################################
8
9 set -u
10 set -e
11
12 # remove all packages not necessary anymore:
13 $ROOTCMD apt-get -y --purge autoremove
14
15 # remove packages until deborphan does not find anymore:
16 while [ "$($ROOTCMD deborphan)" != "" ] ; do
17   $ROOTCMD apt-get -y --purge remove $(deborphan)
18 done
19
20 ## END OF FILE #################################################################
21 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2