Skip to content

Instantly share code, notes, and snippets.

@yazanmonshed
Last active May 5, 2024 09:10
Show Gist options
  • Save yazanmonshed/18150da0b795a1f44197191a8f57d625 to your computer and use it in GitHub Desktop.
Save yazanmonshed/18150da0b795a1f44197191a8f57d625 to your computer and use it in GitHub Desktop.
check the installed package on system (Debian Based OS)
#!/bin/bash
# Pass the package name
package=$1
# Check if the package is installed on system ()
if dpkg -s $package > /dev/null 2>&1; then
echo "$package is installed."
else
echo "$package is not installed."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment