How is this not a built-in function of pacman?

  • moonpiedumplings@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    23 hours ago

    The correct solution is to use systemd-inhibit to block sleep/shutdown (on systemd distros at least).

    sudo systemd-inhibit --what=shutdown:sleep --mode=block pacman -Syu
    

    EDIT: Oop someone already mentioned systemd-inhibit in another commend. And their answer is even shorter than mine and apparently still works.