A simple and helpful Bash script for Ubuntu (and other Debian-based distros) that quickly checks:
- How an application is installed (Snap, Flatpak, or APT).
- Installed application version compared to the versions available from Snap, Flatpak, and APT.
- Provides an option to install the application if it's currently not installed.
./check-install-source.sh <app_name>Example:
./check-install-source.sh zoomIf the app is not installed, the script will present you with installation options from:
- Snap
- Flatpak
- APT
You can easily select the desired source by entering the corresponding number (1-3), or cancel the operation.
- Clone or download the script:
git clone <repo_url>
cd <repo_folder>
chmod +x check-install-source.sh- Run the script:
./check-install-source.sh <app_name>If you want to call the script directly from anywhere, follow these steps:
sudo cp check-install-source.sh /usr/local/bin/check-install-source
sudo chmod +x /usr/bin/check-install-source.shNow, you can run the script directly:
check-install-source.sh zoommkdir -p ~/bin
cp check-install-source.sh ~/bin/check-install-source
chmod +x ~/bin/check-install-sourceAdd your ~/bin to your PATH if it's not already:
echo 'export PATH=$PATH:~/bin' >> ~/.bashrc
source ~/.bashrcNow you can use it anywhere with:
check-install-source zoom- Ubuntu or Debian-based Linux distribution.
- Optional (for maximum compatibility):
snapflatpak
- Required:
apt
- Clearly identifies installation method (Snap, Flatpak, or APT).
- Shows installed and available versions from Snap, Flatpak, and APT.
- Colored output indicating newer, older, or up-to-date versions.
- Offers user-friendly installation options when the app isn't installed.
- Safely handles cases when
snap,flatpak, oraptare missing.
- 🟢 Green: Up-to-date
- Magenta: Newer version available
- Yellow: Older version
- Red: Not available
- Ubuntu or Debian-based Linux distribution.
- Optional but recommended:
snapflatpak
- Required:
apt
- Tested on Ubuntu 22.04 and 24.04
- Compatible with most Debian-based Linux distributions
Feel free to contribute, improve or report issues!