Thought I would share this video, pretty good video imho. Does anyone have any other commands they would add to Ermannoβs basic maintenance?
There is no need to yay -Syu
, when only yay
does the same thing. It seems that nobody
read the yay
manual. Or people just like typing -Syu
β¦
What he said.
Also, at the end of the video, he mentions updating the mirrors using reflector
β¦ There is typically no need to do that on Arch, unless you notice your package download speed suddenly gets low.
But when you do it, just in case, run sudo pacman -Syyu
(with two y
) immediately afterwards, so that the local package database is properly synced with new mirrors.
1 Bleachbit can screw your system up - use with care.
2 Deleting the cache can cause some programs to lose functionality, rofi uses it to build a recent history, browsers can store login cookies.
I lost the will to live after that
I have a script that I just converted to use aura, that does my maintenance:
#!/bin/zsh
s_colour="blue"
CURR=`date +%Y%m%d`
PREV=$(<~/.updates/runonce)
#ββββββββββββββββββββ
#β Updating Mirrors β
#ββββββββββββββββββββ
boxp "Updating Mirrors" 1 $s_colour
#ββββββββββββββββββββββββββββββββββββββ
#β Finding fastest Arch mirror....... β
#ββββββββββββββββββββββββββββββββββββββ
boxp "Finding fastest Arch mirror......." 1 $s_colour
if [[ "$CURR" > "$PREV" ]]; then
sudo reflector --verbose --latest 40 --sort rate --save /etc/pacman.d/mirrorlist &> /dev/null
echo "Ranking repos completed."
else
boxp "Mirrors have already been updated today!" 0 green
fi
file="$HOME/.up.txt"
date=~/.updates/$(date +%Y-%m-%dT%H:%M)
sudo aura -Syy
checkupdates > ~/.up.txt
minimumsize=1
actualsize=$(wc -c <"$file")
#βββββββββββββββ
#β Repos & AUR β
#βββββββββββββββ
boxp "Repos & AUR" 1 $s_colour
sudo aura -Syu --noconfirm
sudo aura -Auax --noconfirm
if [ $actualsize -ge $minimumsize ]; then
cp $file $date
sudo gopreload-batch-refresh.sh
else
echo size is under $minimumsize bytes
fi
#ββββββββββββββββββ
#β Clearing Cache β
#ββββββββββββββββββ
boxp "Clearing Cache" 1 $s_colour
#sudo aura -Cc 3 --noconfirm
sudo aura -Cc 3 -u --noconfirm
#zsudo paccache -ruk0
#βββββββββββββββββββββββββββββββββ
#β Clear saved states - leave 5. β
#βββββββββββββββββββββββββββββββββ
boxp "Clear saved states - leave 5." 1 $s_colour
sudo aura -Bc 5 --noconfirm
#βββββββββββ
#β Orphans β
#βββββββββββ
boxp "Orphans" 1 $s_colour
sudo aura -Oj --noconfirm
#ββββββββββββ
#β Dotfiles β
#ββββββββββββ
boxp "Dotfiles" 1 $s_colour
FILE=/usr/bin/yadm
if [[ "$CURR" > "$PREV" ]]; then
if test -f "$FILE"; then
~/scripts/yadm-add.sh
yadm commit -am "`date`" && yadm push -u origin master
fi
else
boxp "Dotfiles have already been backed up today." 0 cyan
fi
#βββββββββββ
#β Summary β
#βββββββββββ
if test -f "$date"; then
boxp "Summary" 1 red
bat $date --pager=never
fi
#ββββββββββββ
#β updatedb β
#ββββββββββββ
boxp "Running updatedb (fork)" 1 $s_colour
sudo updatedb&
#ββββββββββββ
#β Finished β
#ββββββββββββ
date +%Y%m%d > ~/.updates/runonce
boxp "Finished" 1 $s_colour
Here is an Arch clean-up on isle 5 bookmark I keep handy;
But honestly, I use Stacer which also supports Arch. I mostly only use the βsystem cleanerβ function and I have never had an issue in all the years I have used it. Flush away gigs worth of uneeded cache .
Nice, thanks for the links.
Thanks for reminding me I noticed with the kernel updates at least that EOS downloads the kernel components far faster than Manjaro or Garuda.
Arch, EndeavourOS and Garuda all use the same mirrors, so if you configure them the same way, you should have the same speeds (at least when it comes to packages from the Arch repos). Manjaro uses its own mirrors, and they seem to be much less reliable and much slower. Also, Manjaro has this super annoying Pamac timer that messes up your mirror configuration once a week. If youβre using Manjaro, my advice is to disable that.
Hmmm - amazing how easily βhand holdingβ can become more like handcuffs!
Looks interesting - but missing a piece? whereβs boxp() ? Or is that a zsh thingβ¦ (or do I need to create it - I have several like items in my old code toolbox (βCβ, Basic, Modula-2 )
Sorry, it is a quick python script:
#!/usr/bin/env python
import sys
def boxprint(Mess, nStyle, Color):
"""
Mess - Text string to print
nStyle - Box style (int)
Color - uppercase string e.g. "RED"
"""
Colours = {'PURPLE': '\033[1;32;35m', 'CYAN': '\033[1;32;36m', 'DARKCYAN': '\033[0;32;36m',
'BLUE': '\033[1;34;40m', 'GREEN': '\033[1;32;40m', 'YELLOW': '\033[1;32;33m',
'RED': '\033[1;32;31m', 'BOLD': '\033[1;37;40m', 'UNDERLINE': '\033[2;37;40m',
'END': '\033[0;37;48m'}
print(Colours.get(Color), end='', flush=True)
sp = " "
#Catch errors:
if nStyle <= 0:
nStyle = 0
if nStyle > 6:
nStyle = 6
#Set box style:
if nStyle == 0:
bx = ["", "", "", "", "", ""]
if nStyle == 1:
bx = ["β", "β", "β", "β", "β", "β"]
if nStyle == 2:
bx = ["*", "*", "*", "*", "*", "*"]
if nStyle == 3:
bx = ["β", "β", "β", "β", "β", "β"]
if nStyle == 4:
bx = ["β", "β", "β", "β", "β", "β"]
if nStyle == 5:
bx = ["β", "β", "β", "β", "β", "β"]
if nStyle == 6:
bx = ["#", "#", "#", "#", "#", "#"]
Mess= sp + Mess + sp
if nStyle > 0:
print(Colours.get(Color) + bx[0] + bx[1] * len(Mess) + bx[2] + Colours.get('END'))
print(Colours.get(Color) + bx[3] + Mess + bx[3] +Colours.get('END'))
if nStyle > 0:
print(Colours.get(Color) + bx[4]+ bx[1] * len(Mess) + bx[5] + Colours.get('END'))
print(Colours.get('END'), end='', flush=True)
try:
clp1 = sys.argv[1].upper()
except:
clp1 = " "
if clp1 == " ":
print("usage: boxp \"string\" Style Colour")
print('e.g. boxp \"This is a message\" 1 blue')
sys.exit()
mess = sys.argv[1]
style = int(sys.argv[2])
colour = sys.argv[3].upper()
boxprint(mess, style, colour)
I couldnβt find anything that drew simple boxes, weird ones yes
.-"""-.
/ .===. \
\/ 6 6 \/
( \___/ )
_________ooo__\_____/______________
/ \
| joan stark spunk1111@juno.com |
| VISIT MY ASCII ART GALLERY: |
| http://www.geocities.com/SoHo/7373/ |
\_______________________ooo_________/ jgs
| | |
|_ | _|
| | |
|__|__|
/-'Y'-\
(__/ \__)
See what I mean!!!
Then their is the simple arch way it called a terminal, Yay -Sc to clean cache
yay -Scc the delete the total cache these command also allow you to clear the yay cache as well if you want.
My system maintenance:
- update multiple times throughout the day with no regard for arch announcements
- ignore pacnew files till something goes wrong
- likewise basically never reboot after updates unless i notice quirky behaviors
- donβt touch my pacman cache directory for years at a time and wonder where all my disk space has gone
- run yay and keep hitting enter until a package installs with no regard for the promps