[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How does one ....?

Frank DiGravina escribió:

Hi Frank :-)

How does one query one's Debian box to determine
what packages have been installed?

I think the better way to know that is:

$ dpkg -l | awk '/^ii/ {print $2}'

But sure, it's better to see with a pager or redirect to a file:

$ dpkg -l | awk '/^ii/ {print $2}' | less


$ dpkg -l | awk '/^ii/ {print $2}' > file.txt

'dpkg --get-selection' could give you also the list of packages, but you must be careful with the filter you pass to it.

$ dpkg --get-selections | awk '/install/ { print $1 }'

gives you also the packages with the status *deinstall*, which are packages that you've installed but you've also removed.


Reply to: