Skip to content

Commit

Permalink
Main script
Browse files Browse the repository at this point in the history
  • Loading branch information
IfGremlinThen authored Dec 15, 2022
0 parents commit e0f0123
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions elixir.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh
echo "UPDATING PACKAGE CATALOG..."
sudo dpkg --configure -a #CONFIGURES ANY UNCONFIGURED & UNPACKED PACKAGES
sudo apt --fix-broken install #-y #SEARCHES FOR BROKEN PACKAGES
sudo apt update #UPDATES EXISTING REPOSITORIES
sudo apt upgrade -y #UPDATES PACKAGES FROM REPOSITORIES
#IF YOU RECEIVE "dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)" THEN RUN "sudo dpkg -i --force-overwrite var/cache/apt/archives/[PACKAGE NAME]"
sudo apt autoremove -y #REMOVES OBSOLETE PACKAGES PREVIOUSLY INSTALLED AS DEPENDENCIES
echo "CLEARING SYSTEM CACHE..."
sudo apt autoclean #REMOVES OBSOLETE PACKAGE CACHES
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches #CLEAR DISC CACHE
journalctl --disk-usage #CHECKS DISC USAGE OF SYSTEMD JOURNAL LOGS, LOCATED IN /VAR/LOG/JOURNAL
sudo journalctl --vacuum-time=3d #REMOVES SYSTEMD JOURNAL LOGS OLDER THAN 3 DAYS
sudo rm -rf /var/lib/snapd/snaps/* #REMOVES OLDER VERSIONS OF SNAP PACKAGES
sudo rm -rf ~/.cache/thumbnails/* #REMOVES ENTIRE THUMBNAIL CACHE

echo "Consider addressing these files:"
cd && find -type f -exec du -Sh {} + | sort -rh | head -n 8
echo "Check /.local/share/applications for redundant files."
echo "Please restart your computer."

#REMOVE RESIDUAL CONFIGURATION FILES FROM REMOVED PACKAGES
#sudo dpkg -l | grep '^rc' | awk '{print $2}' | sudo xargs dpkg --purge

0 comments on commit e0f0123

Please sign in to comment.