---
name: "snap-discard-ns"
section: "8"
platform: "linux"
package: "snapd"
version: "2.68.3-3+deb13u1+b7"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/snap-discard-ns"
---

# snap-discard-ns(8)

internal tool for discarding preserved namespaces of snappy applications

## NAME

snap-discard-ns - internal tool for discarding preserved namespaces of snappy applications

## SYNOPSIS

snap-discard-ns \[--from-snap-confine\] SNAP\_INSTANCE\_NAME

## DESCRIPTION

The *snap-discard-ns* is a program used internally by *snapd* to discard a preserved mount namespace of a particular snap.

## OPTIONS

The --from-snap-confine option is used internally by snap-confine to tell snap-discard-ns that it is invoked from snap-confine and can disable locking.

## ENVIRONMENT

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

- ***SNAP\_CONFINE\_DEBUG*:**

  When defined the program will print additional diagnostic information about the actions being performed. All the output goes to stderr.

## FILES

*snap-discard-ns* uses the following files:

*/run/snapd/ns/$SNAP\_INSTNACE\_NAME.mnt*: */run/snapd/ns/$SNAP\_INSTNACE\_NAME.\*.mnt*:

The preserved mount namespace that is unmounted and removed by *snap-discard-ns*. The second form is for the per-user mount namespace.

*/run/snapd/ns/snap.$SNAP\_INSTNACE\_NAME.fstab*: */run/snapd/ns/snap.$SNAP\_INSTNACE\_NAME.\*.user-fstab*:

The current mount profile of a preserved mount namespace that is removed by *snap-discard-ns*.

## BUGS

Please report all bugs with  \<https://bugs.launchpad.net/snapd/+filebug\>

## AUTHOR

zygmunt.krynicki@canonical.com

## COPYRIGHT

Canonical Ltd.
