mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 15:02:34 +00:00
19
app/SSH/OS/scripts/cleanup.sh
Normal file
19
app/SSH/OS/scripts/cleanup.sh
Normal file
@ -0,0 +1,19 @@
|
||||
# Update package lists
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
|
||||
|
||||
# Remove unnecessary dependencies
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y
|
||||
|
||||
# Clear package cache
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get clean -y
|
||||
|
||||
# Remove old configuration files
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get purge -y $(dpkg -l | grep '^rc' | awk '{print $2}')
|
||||
|
||||
# Clear temporary files
|
||||
sudo rm -rf /tmp/*
|
||||
|
||||
# Clear journal logs
|
||||
sudo DEBIAN_FRONTEND=noninteractive journalctl --vacuum-time=1d
|
||||
|
||||
echo "Cleanup completed."
|
Reference in New Issue
Block a user