📜  如何清理 snap linux - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:22.387000             🧑  作者: Mango

代码示例1
#!/bin/bash
 #Removes old revisions of snaps
 #CLOSE ALL SNAPS BEFORE RUNNING THIS
 set -eu
 LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
     while read snapname revision; do
         snap remove "$snapname" --revision="$revision"
     done