Hello there! Today I was wondering if I could perform a full system update faster. I use packages from the AUR and flatpak along with Arch official packages. So I came up with this simple solution:
We’re going to create an alias command that will be remembered after every login and that performs a full system update (including AUR and flatpak).
First of all, we’ll open our .bashrc file
Then at the bottom of it, let’s add our command
alias YOUR_ALIAS='yay && flatpak update && flatpak uninstall --unused'
*Notice you could use any word here as your alias.
Next step is to save with Ctrl + O and close the file with Ctrl + X. And that’s it! you can close your terminal or try your new alias: to do so, just type it in; it will ask for sudo password, and do its job.
As you might have figured out by now, the alias combines ‘yay’ (that will perform ‘yay -Syu’ wich is similar to pacman -Syu + updating packages from the AUR) and ‘flatpak update’ (wich will update flatpak packages); then ‘flatpak uninstall --unused’ (it will uninstall old flatpak packages no longer in use) - Thanks @Beardedgeek72 for this last command!.
Creating the alias and saving it to .bashrc will make it available any time you open a terminal.
And that’s it for now, I hope you find it useful!