First of all, please do not consider my post as an advice.
As the thread proceeded (and as I mentioned below in this OP) I said:
I am sure it is not perfect.
So please take this as nothing more than I am just thinking loud.
Just an attempt… no more.
So, the main reference for cleaning the system is A Complete Idiot's Guide To Endeavour OS Maintenance / Update / Upgrade and not this thread
As part of my commitment to the community I would like to share with you something I did to my laptop a few times and booted and me and my laptop are still alive.
I understand this is not windoze, but I read about orphaned packages, and caches of uninstalled apps… and anyway there are on official Arch websites instructions to clean a bit.
I read about cleaning the system, cached stuff, orphaned packages… etc. at:
- A Complete Idiot's Guide To Endeavour OS Maintenance / Update / Upgrade (where @fbodymechanic was my main refference, and @dalto 's comments… and others.
- OCR to Add Text to File - #68 by limotux where @dalto and @Kresimir helped me a lot.
- and the discussions at System clean up & Maintenance
I made a little script “clean.sh” (not perfect I know) but it works I believe, which I share with you:
#!/bin/bash
echo "$1" | eos-rankmirrors
echo "$1" | yay -Syyu
echo "$1" | sudo pacman -Sc
journalctl --vacuum-time=4weeks
paccache -ruk0
echo "$1" | sudo pacman -Rns $(pacman -Qdtq)
( I am getting an error message “no targets specified”)
Then I added the line a line to ~/.bashrc
alias clean="bash /home/limo/Software/MyScripts/clean.sh"
to make it like a Linux command to run my clean.sh script.
I hope this helps!
I ran the command I just created( clean
) and booted repeatedly a few times before posting to be sure it does not hurt anybody.
I am sure it is not perfect. The first script I ever made was a few days ago “ocr”
I hope this helps!
This is my second contribution. I hope my first one How I changed Grub Screen would be of interest.
I hope to hear from the experts as I hope to learn more and more…