![](/@@/translation-newline)
The pack command packs the given snap-dir as a snap and writes the result to
![](/@@/translation-newline)
target-dir. If target-dir is omitted, the result is written to current
![](/@@/translation-newline)
directory. If both source-dir and target-dir are omitted, the pack command packs
![](/@@/translation-newline)
the current directory.
![](/@@/translation-newline)
The default file name for a snap can be derived entirely from its snap.yaml, but
![](/@@/translation-newline)
in some situations it's simpler for a script to feed the filename in. In those
![](/@@/translation-newline)
cases, --filename can be given to override the default. If this filename is
![](/@@/translation-newline)
not absolute it will be taken as relative to target-dir.
![](/@@/translation-newline)
When used with --check-skeleton, pack only checks whether snap-dir contains
![](/@@/translation-newline)
valid snap metadata and raises an error otherwise. Application commands listed
![](/@@/translation-newline)
in snap metadata file, but appearing with incorrect permission bits result in an
![](/@@/translation-newline)
error. Commands that are missing from snap-dir are listed in diagnostic
![](/@@/translation-newline)
messages.
![](/@@/translation-newline)
When used with --append-integrity-data, pack will append dm-verity data at the end
![](/@@/translation-newline)
of the snap to be used with snapd's snap integrity verification mechanism.