Skip to content

Instantly share code, notes, and snippets.

@Neolot
Created May 10, 2025 00:36

Revisions

  1. Neolot created this gist May 10, 2025.
    14 changes: 14 additions & 0 deletions update.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/usr/bin/sh
    sudo apt update && sudo apt list --upgradable

    echo 'Do you want to run the update? (Y/n)'
    read INPUT

    case $INPUT in
    n)
    echo 'Update cancelled.'
    exit
    ;;
    esac

    sudo apt upgrade && sudo apt autoremove && sudo snap refresh