How to obtain list of installed packages

Tom H tomh0665 at gmail.com
Wed May 11 11:08:38 UTC 2016


On Wed, May 11, 2016 at 12:47 PM, Ralf Mardorf <silver.bullet at zoho.com> wrote:
> On Wed, 11 May 2016 12:06:29 +0200, Tom H wrote:
>>
>> The best answer's the one that proposed an aptitude search because it
>> returned the list of packages that were installed specifically rather
>> than automatically.
>
> this isn't a good advice.
>
> A pitfall could be that some packages are installed with the
> recommended packages, but others were not installed with recommended
> packages. This is important even when installing the same Ubuntu
> release and fails when following your advice Tom.

Not at all.

You can run "aptitude -F %p search '?narrow(?installed,!?automatic)'"
(or "aptitude -F %p search '~S ~i !~M'") to get the list of packages
that were installed manually.

You then install them all with "--no-install-recommends" and you then
re-install those with "Recommends" with "--install-recommends". If you
haven't lept track of the packages installed with or without
"Recommends", tough luck!




More information about the ubuntu-users mailing list