You are not logged in.

#1 2023-12-11 12:25:07

KnutKowalski
Member
Registered: 2023-12-11
Posts: 5

display all programs installed by me in terminal

Hello! I wanted to ask if anyone can tell me how or if I can display all programs installed by ME (not all associated packages) in Arch terminal.

Thanks!

Last edited by KnutKowalski (2023-12-11 12:26:09)

Offline

#2 2023-12-11 12:33:42

dogknowsnx
Guest

Re: display all programs installed by me in terminal

Hi, and welcome to the forum!
Please have a read here: https://wiki.archlinux.org/title/Pacman/Tips_and_tricks

#3 2023-12-11 13:26:58

KnutKowalski
Member
Registered: 2023-12-11
Posts: 5

Re: display all programs installed by me in terminal

Thank you very much!
It's not 100% what I meant, but almost and helps me a lot.

Offline

#4 2023-12-11 13:49:38

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,554
Website

Re: display all programs installed by me in terminal

If 'explicitly installed' doesn't meet your criteria, could you elaborate on why not?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2023-12-11 14:37:34

Nebulosa
Member
Registered: 2009-08-24
Posts: 49

Re: display all programs installed by me in terminal

I'm using this script:

#!/bin/bash

# https://wiki.archlinux.org/title/Pacman/Tips_and_tricks#Packages_and_dependencies
## sudo pacman -Syu --needed expac

echo -e  "\033[1mFrom repository:\033[0m"
expac -H M "%011m\t%-20n\t%10d" $(comm -23 <(pacman -Qqen | sort) <((expac -l '\n' '%E' base-devel; expac -l '\n' '%E' base) | sort -u))
[ -n "$(pacman -Qm)"  ] && ( echo -e "\n\033[1mFrom AUR:\033[0m"; expac -H M "%011m\t%-20n\t%10d" $(pacman -Qqm) )

Offline

#6 2023-12-11 14:53:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,462
Website

Re: display all programs installed by me in terminal

The OP asked for programs not packages.  But the "installed by me" is vague - what do you mean by that.  You can use `find` to find all executables in your PATH, e.g., I use:

IFS=:; find $PATH -type f -executable -exec basename '{}' \;

But for gnu find that'd be a bit different:

find $(echo $PATH | tr : '\n') -type f -executable -printf "%P\n"

If you want the subset of this list that includes only programs that were installed as part of a package (i.e., managed by pacman) then just add a filter, e.g.:

find $(echo $PATH | tr : '\n') -type f -executable | sort >| /tmp/executable.list

pacman -Qlq | sort | comm -12 - /tmp/executable.list | sed 's|.*/||g'

Or if you use bash and like ugly commands you can use the obfuscated code - I mean process substitution - approach:

find $(echo $PATH | tr : '\n') -type f -executable | sort | comm -12 - <(pacman -Qlq | sort) | sed 's|.*/||g'

Last edited by Trilby (2023-12-11 15:07:25)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2023-12-11 16:43:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,054

Re: display all programs installed by me in terminal

grep -Ehr '^Name=' /usr/share/applications  ~/.local/share/applications | sort -u

?

Online

Board footer

Powered by FluxBB