free-space.sh
This commit is contained in:
parent
a6efad142c
commit
b955698cbc
26
shell/free-space.sh
Normal file
26
shell/free-space.sh
Normal file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# Очистка места на диске
|
||||
# https://gist.github.com/anthonyaxenov/02c00c965be4eb5bb163a153abdf4c2b
|
||||
# https://itsfoss.com/free-up-space-ubuntu-linux/
|
||||
|
||||
df -h
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
sudo apt autoremove --purge
|
||||
sudo apt autoclean
|
||||
sudo apt clean
|
||||
sudo journalctl --vacuum-time=1d
|
||||
sudo rm -rf /var/log/journal/user-*@*
|
||||
sudo rm -rf /var/log/journal/system*@*
|
||||
rm -rf ~/.local/share/Trash/files/*
|
||||
rm -rf ~/.cache/thumbnails/*
|
||||
set -eu
|
||||
snap list --all | awk '/disabled/{print $1, $3}' |
|
||||
while read snapname revision; do
|
||||
snap remove "$snapname" --revision="$revision"
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
df -h
|
Loading…
Reference in New Issue
Block a user