Skip to content

Commit

Permalink
Update post-install hook for Ubuntu 24.04
Browse files Browse the repository at this point in the history
Signed-off-by: Georg Lauterbach <[email protected]>
  • Loading branch information
georglauterbach committed Sep 9, 2024
1 parent 29f17dc commit fb578f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/versioned/24.04/post_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ function setup_snap() {
if command -v snap &>/dev/null; then
log 'info' "Purging 'snapd'"

killall snap
systemctl stop snapd
killall snap &>/dev/null || :

until [[ $(snap list 2>&1 || :) == 'No snaps'*'installed'* ]]; do
while read -r SNAP _; do
snap remove --purge "${SNAP}" &>/dev/null || :
done < <(snap list |& tail -n +2 || :)
done

systemctl stop snapd.service snapd.socket
apt-get -qq purge snapd gnome-software-plugin-snap
apt-mark -qq hold snapd
rm -rf /var/cache/snapd/ "${HOME}/snapd" "${HOME}/snap"
Expand Down

0 comments on commit fb578f1

Please sign in to comment.