mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-05-24 11:04:41 +02:00
bin/clean.sh: added
This commit is contained in:
parent
5c9c631024
commit
2630126852
2 changed files with 19 additions and 0 deletions
18
bin/clean.sh
Executable file
18
bin/clean.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
case "$1" in
|
||||
all)
|
||||
$0 docker
|
||||
$0 pacman
|
||||
;;
|
||||
docker)
|
||||
docker container ls --filter status=exited --format '{{.ID}}' | xargs -r docker container rm
|
||||
docker image ls --filter dangling=true --format='{{.ID}}' | xargs -r docker image rm
|
||||
;;
|
||||
pacman)
|
||||
pacman -Scc
|
||||
;;
|
||||
*)
|
||||
echo "Please give parameter of: [all docker pacman]"
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue