16 lines
388 B
Bash
Executable File
16 lines
388 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Remove packages not necessary for release
|
|
apt-get -y purge bash-completion file gcc git htop openssh-server tree uuid-runtime vim
|
|
dpkg -l | awk '{print $2}' | grep '\-dev$' | apt-get -y purge
|
|
apt-get -y --purge autoremove
|
|
|
|
# Clean package cache
|
|
apt-get -y clean
|
|
|
|
# Remove user settings
|
|
rm -rf /root/* /root/.*
|
|
|
|
# Remove git metadata
|
|
find / -name '.git*' -exec rm -rf {} \;
|