Where to start First steps track · 15 stages
Linux Labs

snap — Ubuntu packages

cheat sheet · Ubuntu 24.04 · snapd https://lab.dimsanych.ru/en/wiki/snap/

Cheat sheet

  • snap list installed packages
  • sudo snap install nginx install a package
  • sudo snap refresh update all packages
  • sudo snap refresh --hold nginx pause auto-updates for a package
  • sudo snap revert nginx roll back to the previous version
  • snap services services of all snap packages
  • sudo snap remove --purge nginx remove along with its data

Options

A package is installed inside a sandbox (confinement): access to files outside $HOME and to devices must be granted explicitly through interfaces (plug/slot), otherwise snap can't see them even if the process runs as root. --classic removes the sandbox entirely — use it only for packages that ask for it themselves (IDEs, build tools), never by default.

bash
snap connections nginx            # which interfaces are connected
sudo snap connect nginx:removable-media   # grant access explicitly
sudo snap set system refresh.retain=2     # keep fewer old revisions
Loading…