LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   List installed programs (https://www.linuxquestions.org/questions/linux-software-2/list-installed-programs-755004/)

CEB 09-14-2009 02:52 AM

List installed programs
 
When looking for new software to install manually via terminal, it often has requirements, dependencies.

I would like to list and search my computer for what I already have installed, via terminal. How do I do that?

~sHyLoCk~ 09-14-2009 03:23 AM

Code:

dpkg --get-selections > list

lutusp 09-14-2009 03:30 AM

Quote:

Originally Posted by CEB (Post 3681915)
When looking for new software to install manually via terminal, it often has requirements, dependencies.

I would like to list and search my computer for what I already have installed, via terminal. How do I do that?

Another poster has shown one way to find out what packages are installed, but in practice this won't be of much benefit. Instead you will be better off simply trying to install packages and see what dependency issues come up.

If you have a high-speed Internet connection, use either yum or apt-get, depending on your distribution:

# yum list | grep (package-name or shorter search phrase)

# yum install (package-name)

Any dependency problems will be solved, not flagged, if you do it this way.

CEB 09-14-2009 03:36 AM

That's a good idea but I'm trying practising packageinstalling manually in the terminal so using apt-get would be cheating...

lutusp 09-14-2009 03:47 AM

Quote:

Originally Posted by CEB (Post 3681954)
That's a good idea but I'm trying practising packageinstalling manually in the terminal so using apt-get would be cheating...

Manual package installation is now in the same category as the dodo bird and the passenger pigeon. By pursuing this objective, you will likely experience "dependency hell" first-hand and will soon be a candidate for post-traumatic stress disorder therapy.

Hay, good luck. Do you by chance own a hair shirt?

Shadow_7 09-14-2009 04:25 AM

There's ways, but as mentioned not much benefit. Outside of some educational aspects and maybe some space management. Although space is so cheap these days. 1TB HDD is like $100 now. Depending on your distro, you might find internet options more revealing ( packages.debian.org ). But it's a family tree thing. A gui requires X which requires a window manager which requires ..., which requires ..., and so on and so on and so on.

For debian-ish ways...

dpkg -l
(lists what is currently installed / or partially installed / partially removed)

dpkg -l '*'
(lists all that is available)

apt-cache show <package>
or
apt-cache showpkg <package>
(lists known dependencies and other package details, but still makes certain assumptions in terms of a base system and such not included in that list)

Or just use dselect or one of the many other installers to navigate dependency hell.

deborphan
(to find out what's installed by not used by anything else anymore, working in reverse at this point)

~sHyLoCk~ 09-14-2009 05:12 AM

You can re-install all the apps you have in case you plan to.
Quote:

dpkg --get-selections > list
dpkg --set-selections < list
dselect
backup your cache from /var/cache/apt/archive

CEB 09-14-2009 05:39 AM

Shadow_7 and ~sHyLoCk~, thanks, now I'm getting a better picture of things!


All times are GMT -5. The time now is 06:01 PM.