Skip to content

Instantly share code, notes, and snippets.

@boratanrikulu
Created November 1, 2022 18:30
Show Gist options
  • Select an option

  • Save boratanrikulu/1de87c1c3350e09d3a35530c98e7f51e to your computer and use it in GitHub Desktop.

Select an option

Save boratanrikulu/1de87c1c3350e09d3a35530c98e7f51e to your computer and use it in GitHub Desktop.
installed=$(pacman -Q linux | sed 's/.arch1-1//' | sed 's/linux //');used=$(uname -r | sed 's/-arch1-1//');orphans=$(pacman -Qdtq);packagecount=$(pacman -Q | wc -l);echo "installed:" $installed; echo "used:" $used; [[ $installed != $used ]] && echo "reboot is needed" || echo "reboot is not needed" && echo "" && ( [[ $orphans != "" ]] && echo "orphans: ${orphans}" || true ) && echo "package count: ${packagecount}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment