Skip to content

Instantly share code, notes, and snippets.

View clintonbrito's full-sized avatar

Clinton Brito clintonbrito

View GitHub Profile
@clintonbrito
clintonbrito / useful-terminal-commands.md
Last active June 24, 2023 23:32
Useful terminal commands

Find a specific package

Custom grep command to sort all flagged installed apps into their package-manager. All you need to do is to enter the command in the terminal, replace <app-name> in the command with your selected app and it will sort it for you.

This includes dpkg, snap and flatpak packages.

( echo -e "\033[1m\033[4m\033[34mSnap packages:\033[0m"; snap list | grep -v Name | awk '{print "  "$1}'; echo ""; echo -e "\033[1m\033[4m\033[34mFlatpak packages:\033[0m"; flatpak list | grep -v Application | awk '{print "  "$1}'; echo ""; echo -e "\033[1m\033[4m\033[34mNative packages:\033[0m"; dpkg -l | grep -v "^ii" | grep -v "^rc" | awk '{print "  "$2}' ) | grep -i --color=always <app-name> || echo -e "\033[1m\033[31mNo results found.\033[0m"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.