Snapcraft

Chester Wyke September 07, 2022 Updated: April 15, 2025 #debian

Snap Setup

Install snap

sudo apt install snapd
sudo snap install core

Add snap bin to path

Open ~/.bashrc for editing

nano ~/.bashrc

Add the following lines to .bashrc

export PATH=$PATH:/snap/bin

Reverting a bad upgrade

Source: https://askubuntu.com/questions/1268615/snap-install-specific-old-version

NB: Example commands use discord because that is one of the programs I was having the problem with at the time. Short summary of problem is:

See versions available locally

snap list discord --all

Don’t have the output from before I fixed it but this is what it shows after:

Name     Version  Rev  Tracking       Publisher     Notes
discord  0.0.19   138  latest/stable  snapcrafters  -
discord  0.0.19   141  latest/stable  snapcrafters  disabled

Do revert

snap revert discord

To go back to the version I reverted from

Search key: unrevert

Wanted to file an issue on the discord repo and wanted to report it while it was not working. Note 141 is the version that I had reverted from. PS It worked after the revert even after a restart.

snap revert --revision=141 discord

Snap uninstall (remove)

Example on notepad++

sudo snap remove notepad-plus-plus

Snap help

snap help

Install snap applications

Discord

sudo snap install discord
cp /var/lib/snapd/desktop/applications/discord_discord.desktop ~/.local/share/applications/

PDF Mix Tool

sudo snap install pdfmixtool
cp /var/lib/snapd/desktop/applications/pdfmixtool_pdfmixtool.desktop ~/.local/share/applications/

Notepad++

snap install notepad-plus-plus
cp /var/lib/snapd/desktop/applications/notepad-plus-plus_notepad-plus-plus.desktop  ~/.local/share/applications/

Snap permissions

Source: https://snapcraft.io/docs/interface-management