Simple EndeavourOS Maintenance “Cheat Sheet”

A year ago I made a “Cheat Sheet” for my personal EOS maintenance regimen heavily based on A Complete Idiot's Guide To Endeavour OS Maintenance / Update / Upgrade by @fbodymechanic. I’ve since modified my cheat sheet slightly for my own use case. Perhaps you’ll find it useful.

EndeavourOS Maintenance “Cheat Sheet”

[Frequency: Every 4-6 weeks, or user discretion]

UPDATE SYSTEM:
yay

  • If you’ve enabled chaotic-AUR, make sure to install rate-mirrors-bin: yay -S rate-mirrors-bin

UPDATE ARCH MIRRORS:
reflector --protocol https --verbose --latest 25 --sort rate | sudo tee /etc/pacman.d/mirrorlist

UPDATE EOS MIRRORS:
eos-rankmirrors --verbose

  • IF ENABLED - UPDATE CHAOTIC AUR:
    rate-mirrors chaotic-aur

AFTER UPDATING MIRRORLISTS, UPDATE SYSTEM:
yay -Syyuu

CLEAN JOURNAL:
sudo journalctl --vacuum-time=4weeks

CLEAN CACHE (All Packages):
paccache -rvk2

CLEAN CACHE (Uninstalled Packages):
paccache -ruk0

REMOVE ORPHANS:
yay -Yc


Warning - I’m not responsible for any problems that may come from following this cheat sheet. It’s YOUR computer to do as you please. YOU are sudo, it’s your own responsibility to maintain your computer as YOU wish. If you do NOT understand what these do - do your own research first. Peace!

11 Likes

Is it intentional to update here, then rank, then update again?

And the double y (Syyu) is still probably not necessary in most cases and should still be avoided unless it becomes necessary in some specific context.

https://wiki.archlinux.org/title/Mirrors#Force_pacman_to_refresh_the_package_lists

(The wiki also seems to indicate that a double u should be used whenever forcing refresh [Syyuu] - in order to avoid partial upgrades .. but this would probably be apparent if/when it occurred so can be remedied on the fly.)


Just to mention .. this will by default be retaining the last 3 versions of packages.
I also like to include v for verbosity.
So if we wanted less, like 2, then

paccache -rvk2
2 Likes

I’ve always done yay before ranking any mirrors. If there are updates, I get them out of the way and then continue.

This will only done every 4-6 weeks after ranking all mirrors.

Yes. I like that. I’ll edit that above.

Still should not be needed the vast majority of the time.
Like - I rank mirrors and update my hosts file and blah blah every now and again .. but cant recall the last time I actually needed the double y.

From the same wiki link:

1 Like

is sequence of commands important here? or is sequence only arbitrary?

Aside from the Update → Sort → Update .. its roughly in the order it should be.

Sort Mirrors → Update → Clean (cache/orphans)

It makes sense to sort before upgrading, orphans after possible changes, and to remove the cache after you might have newer versions of packages.

The journal is the standout there (leaving the last 4 weeks of journals intact) and could be run at any time you want to remove the older journals. Obviously with those parameters your preceding OR following pacman commands and such will all be in the journal regardless of the clean or when it was executed (up until 4 weeks later of course :face_with_tongue:).

3 Likes

all that makes sense and I believe the reflector and rankmirror commands belong at the beginning
but..
should each command (rank and relfector) be separated by a yay -Syyu immediately after them?
Makes me feel better to do but maybe redundant? Or necessary?

Dont use yy unless you need to (such as experiencing issues with a mirror or moving from a broken one, etc).

Sync/upgrade between the different sorting should not be required.

I suppose there is some slight chance that a given sync might provide a different mirror list and then you might sort that new list only if you upgraded/synced between .. but if there was an issue with your existing mirror list then you could not have received the package providing the new mirror list.

Also remember that these repos are all going to be sourced every time.

If you pacman/yay between sorting .. its not like it will only upgrade the EOS packages from that sort - it will be all of your repository packages from Arch/EOS(/+Chaotic) every time you run the sync and upgrade.

So if there was some sort of discrepancy you probably would want to have all of your mirrors sorted before sync/upgrade.

In any case I think your idea of syncing between each of multiple sorts roughly ranks like this;

:warning:   Danger Factor   =   Low   :green_circle:

:tired_face:   Hassle Factor   =   High   :red_circle:

3 Likes

thanks, I understand your reasoning, you said it well.

[PS—as monthly maintenance I still use your McClean as well]

2 Likes

WOW ~ this was super helpful & like always learned a lot from you @UncleSpellbinder

Educate Yourself | Coolbeans4

Super glad my system is cleaned up now. I KNEW there was a way to do such a thing because my old Buddhist friend showed me this once before, but I could not remember what he taught me. Now I can do it myself anytime I want!

1 Like

Pacman-contrib provides a timer+service for paccache (keep the last 3 versions).
I don’t like yay -Yc, you dont see what it’s doing, I prefer to keep my function :

orph() {
	while [[ $(yay -Qdtq) ]]
	 do	yay -Rs $(yay -Qdtq)
	done
}
2 Likes

Noob question - Why not just use eos-update?

This is my 4-6 week maintenance. Not just updating.

3 Likes

Dang… I have run Endeavor for years and before that Antergos for years and never realized the pacnew stuff for new configs :skull::skull:.

And even freaking before that vanilla arch and dangit I still didn’t know… Shows I read the wiki not so thoroughly I guess. But I feel you you only know if you read pacman 's wiki MAYBE or maybe I’m just dumb.

I like this guide by @fbodymechanic

4 Likes

Huh, seems I haven’t had a clue about rank-mirrors utility.
Seems you never stop learning while on the Arch side of things.
I’ve just installed the tool and added to my new month maintenance script.

Indeed! As do I. Which is why I made sure to give credit where credit is due in my initial post. My personal EOS maintenance regimen/Cheat Sheet is heavily based on @fbodymechanic’s Complete Idiot’s Guide with a few modifications that I prefer. :vulcan_salute:

2 Likes

With great power comes great responsibility.
—Peter Parker

Same holds for the great number of choices we have in the Linux & FOSS world. The number of “simple” and “idiot” guides also steadily increases. :smiley:

And one can learn from every one of these, so thank you all for making life a little easier for all us beginners. Even after many years of using *nix-type OSes, there’s always something new and valuable in there!

1 Like

Its a good thing to know.

But I wonder what spurred this comment?
pacnew or pacdiff or similar is not mentioned in this thread?

What do you mean what spurred the comment? I was just giving my thoughts that I never knew about the new config files…