After typing dpkg -l all packages are listed, but some package names are not complete google-chrome-stable in this case.
Can I see the complete package name? Although I can prevent this happening by maximizing terminal window before typing dpkg -l.
dpkg optimizes its output for your terminal width by narrowing the columns of the output table, as you see, to avoid long lines wrapping.
You can simply prevent this by piping its output through e.g. cat, which does nothing on itself (just copying its input to its output), but disconnects dpkg's output from the terminal, so that it can't know its width and will not optimize anything:
dpkg -l | cat
Of course the same disconnection takes place if you pipe it into anything else for further processing anyway, no need to additionally use cat as part of a longer pipeline.
dpkg
optimizes its output for your terminal width by narrowing the columns of the output table, as you see, to avoid long lines wrapping.You can simply prevent this by piping its output through e.g.
cat
, which does nothing on itself (just copying its input to its output), but disconnectsdpkg
's output from the terminal, so that it can't know its width and will not optimize anything:Of course the same disconnection takes place if you pipe it into anything else for further processing anyway, no need to additionally use
cat
as part of a longer pipeline.dpkg -l
optimizes its output for your terminal width. So lie todpkg -l
about the width.You can use
dpkg-query
, which provides explicit control over the output format including a field width specification.Ex. to print the package name in a fieldwidth of 50 columns followed by the package version:
or (if you only need the full package name)
You could use
instead.