Skip to content

Instantly share code, notes, and snippets.

@ThinGuy
Last active October 5, 2018 15:58
Show Gist options
  • Save ThinGuy/0858a1977cece91627ace69f1fae693e to your computer and use it in GitHub Desktop.
Save ThinGuy/0858a1977cece91627ace69f1fae693e to your computer and use it in GitHub Desktop.
Update all snaps in parallel
# This command will refresh all installed snaps in parallel.
# If snap was installed with classic confinment, but snap list
# does not report that fact, just put that snap in the first awk
# if statement (pipe separated)
snap list|awk '/^[a-z]/{if (/classic|charm/) print $1 " --classic";if (!/classic/) print $1}'|xargs -L1 -P0 sudo snap refresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment