Why does dpkg --list no longer show all installed programs?

I recently tried to install GIMP (photo-editor) using the terminal and I think it required me to install flatpak, which I don't really understand and shouldn't have installed it I guess, because now I can't do what I could before. I have since uninstalled flatpak, but still have same problem.

Earlier, when I was using dpkg --list to get the name of a program I wanted to uninstall, I could see a full list of all installed programs. Now I just get this weird list that doesn't look like programs, and it starts in alphabetical order but only starting at the letter "L", e.g.:

libgphoto2-6:a 2.5.16-2     amd64        gphoto2 digital camera library

is the first entry. And then:

zlib1g:amd64   1:1.2.11.dfs amd64        compression library - runtime

is the last entry.

It doesn't seem to be listing programs. Like, I have clementine installed and its no longer listed with that command. I am so confused.

To give another example, I installed and uninstalled a media player successfully earlier today using the terminal, using dpkg --list to determine said program's name. I can no longer see any real programs using this or similar commands I have found here.

EDIT: apt list --installed gives the same stupid incorrect list.

Maybe it's showing libraries instead of programs now??


Solution 1:

I think that the problem lies in the terminal output configuration. Chances are that it is configured so that it shows 1000 lines, while the output of dpkg --list or apt list --installed is more than 1000 lines.

In your terminal's preferences change the number of scrollback lines from 1000 to 10000 and you should be able to list all of your installed programs.

Solution 2:

Your list may be truncated depending on the type of terminal you are using or for some other reason.

Instead of using: dpkg --list, use the following command instead:

dpkg -l | less

You will be able to scroll up and down the list using the arrow keys.

Use the q key to exit the list and quit.

Alternatively, you can use grep to search for a particular output like in this example:

dpkg -l | grep clementine

or

dpkg -l | grep clemen

If this doesn't work, please let me know and I will delete the answer. Thanks!


However, you mentioned:"How would I install something that starts with, say, the letter C like chrome, if the list only shows programs starting with the letter l thru z?". The answer is that you would use a different command to list available packages because dpkg -l and dpkg --list will only list installed packages.

To list available packages, you can use the apt-cache search command like in this example:

apt-cache search chrome

or

apt-cache search c | grep "^c"

Here, "^c" states to match results that begin with the letter c.