Re: Get list of installed packages
On 06/02/2014 13:06, Tino Sino wrote:
> I wonder, what's the golden way to do this and why?
It depends on what you're doing it for. If it's for a script, dpkg-query
is a better choice, because you can do --showformat
and it does not truncate version strings etc. 'dpkg -l' output
is really meant for humans only, and you need to perform a few
contortions to get a reliable output for scripts (COLUMNS=255 dpkg -l
... etc.); and you can't guarantee compatibility with future dpkg output.
Reply to: