255
submitted 2 days ago by mr_MADAFAKA@lemmy.ml to c/linux@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] Fmstrat@lemmy.world 3 points 1 day ago

Easy peasy.

    # Remove snap
    HAD_SNAPS=false
    if [ -n "$(which snap 2>/dev/null)" ]; then
        HAD_SNAPS=true
        SNAPS=$(snap list |awk '{print $1}' |grep -v Name |grep -vE 'bare|core22|snapd')
        for SNAP in ${SNAPS}; do sudo snap remove ${SNAP}; done
        SNAPS=$(snap list |awk '{print $1}' |grep -v Name)
        for SNAP in ${SNAPS}; do sudo snap remove ${SNAP}; done
        sudo systemctl stop snapd
        sudo systemctl stop snapd.socket
        sudo systemctl disable snapd
        sudo systemctl mask snapd
        sudo apt purge snapd -y
        sudo apt-mark hold snapd
        sudo cat <<EOF | sudo tee /etc/apt/preferences.d/nosnap.pref
Package: snapd
Pin: release a=*
Pin-Priority: -10
EOF
        rm -rf ~/snap
        sudo rm -rf /snap
        sudo rm -rf /var/snap
        sudo rm -rf /var/lib/snapd
        # Add needed repositories
        sudo add-apt-repository ppa:mozillateam/ppa -y
        echo '
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001

Package: thunderbird
Pin: version 2:1snap*
Pin-Priority: -1
' | sudo tee /etc/apt/preferences.d/thunderbird
        sudo add-apt-repository ppa:xtradeb/apps -y
    fi

Note: This is part of my new install script that runs for Debian and/Ubuntu.

this post was submitted on 01 Dec 2026
255 points (98.9% liked)

Linux

68994 readers
999 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS