-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlimpar-disco
executable file
·46 lines (33 loc) · 1.24 KB
/
limpar-disco
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
# Remove package manager cache
yay --noconfirm --needed -Sc &&
# Empty trash
trash-empty -f &&
# Removed unused dependecies
pacman -Rsn --noconfirm $(pacman -Qdtq) &&
# Remove python cache
pip cache purge &&
# Clean docker
docker image prune -a &&
docker system prune -a &&
docker volume prune &&
docker container prune
# Clean cache in /var
trash-put /var/cache/
# Clean cache in home direcotry
trash-put --recursive "$HOME"/.cache/go-build/
trash-put --recursive "$HOME"/.cache/yay/
# Remove go/ directory
trash-put --recursive "$HOME"/go/
# Clean logs older than 1 week
journalctl --vacuum-time=1w
# Ask to start bleachbit
"$HOME"/.scripts/prompt.sh "Start bleachbit?" bleachbit
# Ask to start baobab
# "$HOME"/.scripts/prompt.sh "Start baobab?" baobab
# Ask to start ncdu
"$HOME"/.scripts/prompt.sh "Start ncdu?" ncdu
printf "\n AVISO: Não esqueça de elimnar snapshots antigos do timeshift!!!\n"
printf "Se precisar de mais espaço rode o código abaixo nos repositórios \n git reflog expire --all --expire=now \n git gc --prune=now --aggressive\n"
printf "rode pacman -Qtd para ver pacotes para desinstalar\n"
printf "Você pode instalar o ancient-packages para ver pacotes que você tem instalado que não estão mais nos repositórios\n"