From de5e7d31fdca2add0d0d8d46f448546c74dd4bbf Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Sun, 21 Apr 2024 12:32:29 -0400 Subject: [PATCH] Added script to Ubuntu build to remove snap packages entirely --- Ubuntu-22/ubuntu-22.pkr.hcl | 5 ++++- scripts/remove-snap.sh | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 scripts/remove-snap.sh diff --git a/Ubuntu-22/ubuntu-22.pkr.hcl b/Ubuntu-22/ubuntu-22.pkr.hcl index b80fc73..9c0c4d8 100644 --- a/Ubuntu-22/ubuntu-22.pkr.hcl +++ b/Ubuntu-22/ubuntu-22.pkr.hcl @@ -72,6 +72,9 @@ build { sources = ["source.proxmox-iso.ubuntu-22"] provisioner "shell" { - script = "scripts/debian-install.sh" + scripts = [ + "scripts/debian-install.sh", + "scripts/remove-snap.sh" + ] } } diff --git a/scripts/remove-snap.sh b/scripts/remove-snap.sh new file mode 100644 index 0000000..6145ada --- /dev/null +++ b/scripts/remove-snap.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +apt purge -y snapd + +rm -rf /var/lib/snap +rm -rf /root/snap