-
-
Save devniv/632586 to your computer and use it in GitHub Desktop.
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
# apt/aptitude/dpkg and debconf cache | |
echo "Purging apt/aptitude/dpkg and debconf cache.." | |
rm -r $NEWINSTPATH/var/cache/apt/archives/*.deb | |
rm -r $NEWINSTPATH/var/cache/apt/*.bin | |
rm -r $NEWINSTPATH/var/lib/apt/lists/*debian* | |
rm -r $NEWINSTPATH/var/lib/aptitude/*.old | |
rm -r $NEWINSTPATH/var/lib/dpkg/*-old | |
rm -r $NEWINSTPATH/var/cache/debconf/*-old | |
# logfiles | |
echo "Purging logfiles.." | |
rm -r $NEWINSTPATH/var/log/{*.log*,*.gz} | |
rm -r $NEWINSTPATH/var/log/*/{*.log*,*.gz} | |
# docs and man pages | |
echo "Purging docs and man pages.." | |
rm -r $NEWINSTPATH/usr/share/doc*/* | |
rm -r $NEWINSTPATH/usr/share/man/*/*.gz | |
rm -r $NEWINSTPATH/usr/share/man/*/*/*.gz | |
# system configurations | |
echo "Purging configuration files.." | |
rm -r $NEWINSTPATH/etc/hostname | |
# temp/run | |
rm -r $NEWINSTPATH/var/run/{*.pid,*.sock} | |
rm -r $NEWINSTPATH/tmp/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
notes on which paths have to be cleaned for a pristine debian installation