snap-discard-ns(5)

✨ NAME ✨

okay so bestie, let me put you on to snap-discard-ns β€” it's an internal tool for discarding preserved namespaces of snappy applications πŸ’… (yes, that's the whole vibe of the snap-discard-ns(5) page, and we're gonna get into it)


πŸŽ€ SYNOPSIS πŸŽ€

snap-discard-ns [--snap-already-locked|--from-snap-confine]
SNAP_INSTANCE_NAME

🌸 DESCRIPTION 🌸

So snap-discard-ns is a program that snapd uses internally β€” like, it's not out here for the general public, it's giving backstage crew energy 🧚 β€” and what it does is discard a preserved mount namespace of a particular snap. That's it. That's the job. Slay.


πŸ’… OPTIONS πŸ’…

  • --snap-already-locked β€” this one says "hey, the snap lock has already been taken," and snap-discard-ns will verify that internally, bestie. no cap, it checks πŸ”
  • --from-snap-confine β€” this is literally an alias for the option above ☝️, but it's used only internally, specifically when snap-confine is the one calling snap-discard-ns. iykyk.

πŸ¦‹ ENVIRONMENT πŸ¦‹

snap-discard-ns responds to the following environment variables:

  • SNAP_CONFINE_DEBUG β€” when this is defined, the program will print additional diagnostic information about the actions being performed. and where does all that output go? πŸ‘€ all of it goes to stderr. every last crumb. periodt.

🌈 FILES 🌈

snap-discard-ns uses the following files, so let's get into it:

  • /run/snapd/ns/$SNAP_INSTNACE_NAME.mnt
  • /run/snapd/ns/$SNAP_INSTNACE_NAME.*.mnt β€” this is the preserved mount namespace that gets unmounted and removed by snap-discard-ns. the second form (the one with the * in it) is for the per-user mount namespace 🫢
  • /run/snapd/ns/snap.$SNAP_INSTNACE_NAME.fstab
  • /run/snapd/ns/snap.$SNAP_INSTNACE_NAME.*.user-fstab β€” and these are the current mount profile of a preserved mount namespace, which also gets removed by snap-discard-ns. iconic cleanup behaviour fr fr 🧹✨

πŸ’€ BUGS πŸ’€

found something broken? 😭 please report all bugs with:

https://bugs.launchpad.net/snapd/+filebug

πŸ‘‘ Author πŸ‘‘

zygmunt.krynicki@canonical.com β€” yeah, they ate that πŸ’œ


Canonical Ltd. β€” protect the brand bestie 🫢


and that's the whole page!! this came from snappy 2.36, dated 2018-10-17, and it's the snap-discard-ns(5) manual β€” mwah, go forth and discard those namespaces responsibly πŸ’–βœ¨πŸŽ€