Is this script sufficient for updating?

Since I haven’t used Manjaro in a few weeks I’ve stated to slowly forget how to update it , but I’ve remembered that I made a .sh script to update it and here’s how it looks :

#!/bin/bash

sudo pacman-mirrors --fasttrack

sudo pacman -Syyu

sudo pacman -Syu

Is there anything I may improve in this ?
After using it I started to remember what I did to update it , but this is still a lot more convenient to use with open in terminal from file the manager :slight_smile:

I also made one for checking the ssd health:

#!/bin/bash

sudo smartctl -i /dev/sdc

sudo smartctl -A /dev/sdc

sudo pacman -Syu

is enough

1 Like

Syu or Syyu

There’s always a discussion whether -Syu or -Syyu. The one thing I know for sure, you don’t need both. :slight_smile:

I did a site search at wiki.manjaro.org, and found the item below which showed -Syyu.

However, I found some other webpages that only had Syyu in cache, but not in the current webpage. :thinking:

The pacman man page for this option says:

My interpretation of the above, if the mirrorlist changes or the mirror that will be used this time, all *.db files should be updated, just in case.

Miscellaneous

1) Update /var/lib/pacman/sync/*.files, so you can do searches to find which package owns a file with pacman -Fx.

pacman -Fy

2) There is no mention of reviewing the Stable Update Announcement category to view at a minimum the first post which contains what has changed, issues, and other important notes. It is probably good practice to also read the Arch Latest News, because what affects Arch will most likely affect Manjaro. Sometimes, at some point, it is mentioned in the first post of the Stable Update Announcement.

You could just put a reminder like,

  until [[ ${REPLY:-n} == [yY] ]]; do
    printf -- 'Manjaro Stable Announcement: https://forum.manjaro.org/c/announcements/stable-updates/12\n'
    read -r -e -p 'Have you read the Manjaro Stable Update Announcement [y|N]: '
  done

3) There is no mention of reviewing .pacnew files after a successful update.

4) There is the potential that the repositories in your custom mirrorlist are not available. Perhaps, for starters, the status could be checked.

pacman-mirrors --status

5) If you have AUR packages, you would need to use pamac or some other helper.

That’s all I can think of at the moment. Have fun. :slight_smile:

1 Like

Wow , Thanks for 4)

I’ll actually implement it , and before I’m asked to update the script will also tell me the status of the Mirrors

Big thanks!!!