The snap daemon, snapd, can check whether there is enough free disk space before performing the following space-requiring operations:
Disk space awareness is currently an experimental feature and requires snapd version 2.47+ .
When enabled, snapd checks whether there is enough space in
/var/lib/snapd to complete an operation, such as enough space to store a requested snap to download. If there isn’t enough space, an error is returned and the operation is not performed:
$ snap install foo error: cannot install "foo" due to low disk space
The error output can also include a hint on how a space requirement could be mitigated, such as suggesting the
--purge flag with
snap remove to disable the automatic snapshot generation:
$ snap remove foo error: cannot remove "foo" due to low disk space, use --purge to avoid creating a snapshot
To enable disk space awareness, set one or more of the following experimental feature flags to true:
To enable the pre-install check, for example, use the following command:
$ snap set system experimental.check-disk-space-install=true
See System options for more details on setting and disabling options.
Last updated 6 months ago. Help improve this document in the forum.