Difference between revisions of "Snap remove"

From wikieduonline
Jump to navigation Jump to search
Line 7: Line 7:
  
 
  [[snap list --all]] | awk '/disabled/{print $1, $3}'
 
  [[snap list --all]] | awk '/disabled/{print $1, $3}'
 +
 +
#!/bin/sh
 +
[[LANG]]=[[en_US.UTF-8]] snap list --all | awk '/disabled/{print $1, $3}' |
 +
while read pkg revision; do
 +
  sudo snap remove "$pkg" --revision="$revision"
 +
done
  
 
  snap remove
 
  snap remove
 
  error: the required argument `<snap> (at least 1 argument)` was not provided
 
  error: the required argument `<snap> (at least 1 argument)` was not provided
 
  
 
== Related commands ==
 
== Related commands ==

Revision as of 08:57, 11 October 2023

snap remove SNAP_NAME --revision=5 [1]

Examples

snap remove SNAP_NAME
SNAP_NAME removed
snap list --all | awk '/disabled/{print $1, $3}'
#!/bin/sh
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read pkg revision; do
  sudo snap remove "$pkg" --revision="$revision"
done
snap remove
error: the required argument `<snap> (at least 1 argument)` was not provided

Related commands

See also

Advertising: