summaryrefslogtreecommitdiffstats
path: root/ci/remove_snap.sh
blob: a812307d3be3fca4a3db82b1cb62fa6c981863ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env sh
pushd /etc/apt/preferences.d/
cat > nosnap.pref <<EOF
# To prevent repository packages from triggering the installation of snap,
# this file forbids snapd from being installed by APT.

Package: snapd
Pin: release a=*
Pin-Priority: -10
EOF
popd
snap remove --purge $(snap list | awk '!/^Name|^core/ {print $1}')
apt-get purge -y snapd