From fff7f10dd7d47acc22064e1cde049cf169e1c2ce Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Wed, 9 Nov 2022 17:04:07 -0500 Subject: [PATCH] ci: add purge droplet-agent to DO packer script --- dev/packer/scripts/900-cleanup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dev/packer/scripts/900-cleanup.sh b/dev/packer/scripts/900-cleanup.sh index f6b0f526..60557f88 100644 --- a/dev/packer/scripts/900-cleanup.sh +++ b/dev/packer/scripts/900-cleanup.sh @@ -8,14 +8,16 @@ if [[ ! -d /tmp ]]; then fi chmod 1777 /tmp +export DEBIAN_FRONTEND=noninteractive apt-get -y update -apt-get -y upgrade +apt-get -o Dpkg::Options::="--force-confold" upgrade -q -y --force-yes +apt-get purge droplet-agent +apt-get -y autoremove +apt-get -y autoclean rm -rf /tmp/* /var/tmp/* history -c cat /dev/null > /root/.bash_history unset HISTFILE -apt-get -y autoremove -apt-get -y autoclean find /var/log -mtime -1 -type f -exec truncate -s 0 {} \; rm -rf /var/log/*.gz /var/log/*.[0-9] /var/log/*-???????? rm -rf /var/lib/cloud/instances/*