Skip to content

Instantly share code, notes, and snippets.

@tlesh989
Last active October 26, 2022 20:18
Show Gist options
  • Save tlesh989/dc81ac8f54002528a1e3066950b55127 to your computer and use it in GitHub Desktop.
Save tlesh989/dc81ac8f54002528a1e3066950b55127 to your computer and use it in GitHub Desktop.
Linux Fish system update function
function update
if [ "$(which apt-get 2>/dev/null)" != '' ]
sudo apt update -y
sudo apt upgrade -y
sudo apt autoremove -y
else if [ "$(which dnf 2>/dev/null)" != '' ]
sudo dnf update -y
end
if [ "$(which snap 2>/dev/null)" != '' ]
sudo snap refresh
end
if [ "$(which flatpak 2>/dev/null)" != '' ]
sudo flatpak update -y
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment