Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to safely clean snaps folder in ubuntu

#!/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

# Save the above scrips as .sh in a directory (for example clean_snap.sh), give it
# executable permission and run
chmod +x clean_snap.sh
Comment

PREVIOUS NEXT
Code Example
Shell :: cht sht .vim (config opts) 
Shell :: Elden Bash Install Script 
Shell :: npm install only works globally eacces 
Shell :: white sur icon theme for ubuntu 22.04 
Shell :: scp linix folder 
Shell :: linux show external drives 
Shell :: installing choclatey no adminstrative rights 
Shell :: conda install simplejson 
Shell :: gitlab ssh two factorn recovery 
Shell :: install exercism 
Shell :: curl command download from s3 
Shell :: how to hash a password in bash script 
Shell :: how do I delete existing mobile broadband connections in Linux Ubuntu 
Shell :: how to make terminal close after running code command 
Shell :: kde plasma pop os 
Shell :: curl download with rate limit 
Shell :: vim mass replace pattern across multiple files 
Shell :: Payload ftp download upload 
Shell :: arch symlink 
Shell :: reminder to push to git 
Shell :: set the environment path variable for ffmpeg by running the following command: 
Shell :: https://arxiv.org/abs/2111.09395 
Shell :: bash enum 
Shell :: direct admin could not open 
Shell :: Replace karma with jest angular 
Shell :: how to check if tab was pressed in bash 
Shell :: bash script bell ping 
Shell :: pip install ps_lib 
Shell :: while read 
Shell :: debian copy directory 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =