(Edit: I always forget that Beehaw will convert every ampersand character in code segments to &. Have this in mind when reading the code below. Do you have these problems too with your instance?)

If you update your system from terminal, do you have a shortcut that bundles bunch of commands? I’m on EndevourOS/Arch using Flatpak. Rustup is installed and managed by itself. The empty command is a function to display and delete files in the trash using the program trash-cli. In my .bashrc:

alias update='eos-update --yay \
    ; flatpak uninstall --unused \
    ; flatpak update \
    ; rustup update \
    ; empty'

empty() {
    trash-empty -f --dry-run |
        awk '{print $3}' |
        grep -vF '/info/'
    trash-empty -f
}

I just need to type update. Also there are following two aliases, which are used very rarely, at least months apart and are not part of the main update routine:

alias mirrors='sudo reflector \
        --protocol https \
        --verbose \
        --latest 25 \
        --sort rate \
        --save /etc/pacman.d/mirrorlist \
    && eos-rankmirrors --verbose \
    && yay -Syyu'

alias clean='paccache -rk3 \
    && paccache -ruk1 \
    && journalctl --vacuum-time=4weeks \
    && balooctl6 disable \
    && balooctl6 purge \
    && balooctl6 enable \
    && trash-empty -f'

This question is probably asked a million times, but the replies are always fun and sometimes reveals improvements from others to adapt.

      • Varyag@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        8 days ago

        May I ask why? I’m a recent Arch user, and yay seems just fine for me so far. Haven’t looked into paru much yet. Is it because it’s made on Rust, or are there more/better features?

  • data1701d (He/Him)@startrek.website
    link
    fedilink
    English
    arrow-up
    3
    ·
    9 days ago

    Honestly, no. I just use direct apt commands on my Debian installs for native stuff, assuming I even use the shell for that; sometimes, if it’s not a complex update that’s going to hold back 1.0*106 packages, I just use Synaptic or Package Updater, frankly, as one of those is what I have my XFCE Package Update Indicator set to use on any machine I use frequently and it’s convenient sometimes.

    As for Flatpaks, I just run the flatpak update command whenever I feel bored. I wish Warehouse GUI supported updating, just because I find it really weird that’s excluded from an otherwise pretty slick application that gets rid of me having to muck through the Flathub.

    I don’t write Rust code at the moment, and as for Python, I’m either using the Debian version of Python packages or scattered venvs that follow a de facto standard for Python developers: “What’s an update?”

  • Noxious@fedia.io
    link
    fedilink
    arrow-up
    2
    ·
    9 days ago

    On Arch I don’t need any, I just run paru without any options, which by default invokes a full Pacman update, as well as updating all AUR packages. But I have a system maintenance script, that, besides doing some other stuff that’s specific to my system, runs paru -Sc --noconfirm to clean the Pacman package cache, and delete unneeded cloned AUR Git repos and build artifacts.

  • tasankovasara@sopuli.xyz
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    7 days ago

    My hot tip: initial capital so that your aliases are just a capital letter + tab away. Cache cleanup, update and Bleachbit:

    alias Päivi=‘sudo pacman -Suy --noconfirm’

    alias Siivous=‘sudo pacman -Sc --noconfirm;sudo pacman -Rns –noconfirm $(sudo pacman -Qtdq)’

    alias SuurSiivous=‘sudo bleachbit -c system.trash system.ro tated_logs system.localizations java.cache journald.clean b ash.history’

  • Julian@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 days ago

    The Mint upgrade tool got flatpak support so I don’t even use the terminal to update anymore.

  • The Doctor@beehaw.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 days ago

    I don’t, because stuff like that is a little too touchy to wrap in a cute shell alias. If I’m going to update a box, I’m going to update a box. If I’m going to reboot a machine, I want to be reminded that I’m going to reboot a machine (which in turn is a reminder that there are other people using stuff there and not to fuck their days up without at least a little warning).

  • toastal@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    8 days ago
    #!/usr/bin/env dash
    
    set -e
    
    cd $HOME/nixcfg
    
    # flake inputs to update
    for input in nixpkgs nixos-hardware home-manager hosts; do
    	nix --extra-experimental-features flakes --no-warn-dirty flake update $input
    done
    
    # rebuild NixOS
    nixos-rebuild --use-remote-sudo switch --upgrade-all --fallback --flake $HOME/nixcfg#$(hostname) --keep-going
    
    # check for firmware upgrades
    fwupdmgr get-updates
    
    # print hard drive status info
    sudo smartctl -H /dev/nvme0n1
    sudo zpool status -v -x
    
    • Noxious@fedia.io
      link
      fedilink
      arrow-up
      0
      ·
      9 days ago

      An Alpine user, cool! What is it like to use it as your primary desktop OS? I have only played around with it on servers or in VMs and containers.

      • cerement@slrpnk.net
        link
        fedilink
        arrow-up
        1
        ·
        9 days ago

        still in the setup phase and running LabWC rather than a full desktop – but actually rather enjoying it and have been stumbling across a lot of cases finding out that even with a GUI installed, terminal programs do just as good a job if not better than their graphical counterparts (ex. I don’t think I’ll ever be a full vim/emacs convert, but for basic text editing, nano does just as well as mousepad/leafpad/featherpad/xed/gedit)

    • toastal@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 days ago

      You should at least consider nixos-rebuild --use-remote-sudo switch over raw-dogging sudo.

      • flashgnash@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        8 days ago

        What does remote sudo actually do I thought it was meant to be for doing remote builds over ssh

        • toastal@lemmy.ml
          link
          fedilink
          arrow-up
          0
          ·
          8 days ago

          It’ll call sudo at the point it needs to at the end regardless of remote or not. There have been a couple of bugs in the past trying to run the whole process under sudo & --use-remote-sudo was always recommended as a fix.

          • flashgnash@lemm.ee
            link
            fedilink
            arrow-up
            1
            ·
            8 days ago

            Have tried using it this way though the glaring issue for me is that I have to type the password at the end rather than start, meaning I’ll start a rebuild, go for something else then it’ll time out on the sudo password

  • Hyacin (He/Him)@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    arrow-down
    1
    ·
    8 days ago
    alias update='sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y'
    alias update-and-reboot='sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y && sudo reboot'
    alias update-and-poweroff='sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y && sudo poweroff'