gns3-registry/packer/ubuntu/scripts/post_setup.sh

15 lines
244 B
Bash
Raw Normal View History

2022-12-23 04:04:26 +00:00
#!/bin/sh
set -ex
# clear repository
apt-get clean
apt-get autoremove --yes
rm -rf /var/lib/{apt,dpkg,cache,log}/
# clear unused space
echo 'Clearing unused space...'
dd if=/dev/zero bs=1M of=/zero >/dev/null 2>&1 || true; rm -f /zero
sync