Skip to content

Instantly share code, notes, and snippets.

View absahl's full-sized avatar

Saad Abdul Majid absahl

View GitHub Profile
@absahl
absahl / list-available-ubuntu-system-and-software-updates.sh
Last active June 5, 2025 12:38
List available system and software updates on Ubuntu
# Description: Uses apt to list all available system and third-party software updates.
apt list --upgradable
@absahl
absahl / check-available-ubuntu-os-upgrade.sh
Created June 5, 2025 11:52
Check available OS upgrade on Ubuntu
# Description: Checks if a major OS upgrade is available on Ubuntu.
do-release-upgrade -c
@absahl
absahl / list-available-macos-software-updates.zsh
Created June 5, 2025 10:35
List available software updates on macOS
# Description: Uses brew to list all available third-party software updates.
brew outdated --json
@absahl
absahl / list-available-macos-system-updates.zsh
Last active June 5, 2025 07:46
List available system updates on macOS
# Description: Uses softwareupdate to list all available system (os, security, safari and firmware) updates.
softwareupdate --list
@absahl
absahl / list-available-windows-software-updates.ps1
Last active June 5, 2025 07:46
List available software updates on Windows
# Description: Uses winget to list all available software updates, including packages with unknown versions.
winget upgrade --include-unknown
@absahl
absahl / list-available-windows-system-updates.ps1
Last active June 5, 2025 07:48
List available system updates on Windows
# Description: Queries the Windows Update Agent (WUA) API to list all updates that are available for installation.
# Create an Update Session COM object (entry point to Windows Update API)
$Session = New-Object -ComObject Microsoft.Update.Session
# Create an UpdateSearcher to query for available updates
$Searcher = $Session.CreateUpdateSearcher()
# Search for updates where IsInstalled = 0 (i.e., not yet installed)
$SearchResult = $Searcher.Search("IsInstalled=0")