On 11 March 2014 07:08:03 GMT, Neil Greenwood <neil.greenwood....@gmail.com>
wrote:
>
>
>On 10 March 2014 16:38:47 GMT, Daniel Llewellyn <diddle...@gmail.com>
>wrote:
>>On 10 March 2014 16:38, Daniel Llewellyn <diddle...@gmail.com> wrote:
>>
>>> dpkg -l | grep '^i'
>>>
>>> --
>>>
>>> dpkg -l (lowercase L) lists all packages that are installed or
>>otherwise
>>> known to the system (such as those packages you've removed but not
>>purged).
>>> To filter the list to just installed packages we pipe the output
>>(that's
>>> the | character which is shift+\) to grep which checks for lines
>>beginning
>>> (^) with the letter "i" which is what dpkg -l outputs for installed
>>> packages.
>>>
>>>
>>> On 9 March 2014 17:34, Peter Smout <smoutp...@gmail.com> wrote:
>>>
>>
>>sorry, I failed and top-posted :-(
>>
>>--
>>Daniel Llewellyn
>>
>>
>>------------------------------------------------------------------------
>>
>>--
>>ubuntu-uk@lists.ubuntu.com
>>https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
>>https://wiki.ubuntu.com/UKTeam/
>
>You probably want to exclude automatically installed dependencies from
>the list of packages, otherwise you lose the ability of the tools to
>tidy up the things you're not using for you.
>
>I can't remember how to do it just with dpkg - I have a script that
>uses aptitude to get the list of packages for me. IIRC you want an i in
>the first column and not an A in the second, so the grep would be
>
>grep i[^A]
>
>I have another script that runs through all installed packages and
>tries to mark them as auto installed. Any that would cause something to
>be uninstalled are written to a list. This list is then the minimum set
>of packages to install to re-create the package collection. Plus you
>get a system where auto remove works nicely!
>
>Although one thing you need to watch for is that you don't uninstall
>something you still want when removing a package...
>
>I'll dig the scripts out later and post links to paste bin.
>
>
>Neil
>--
>Sent from my Android device with K-9 Mail. Please excuse my brevity.
Sorry to reply to myself...
I forgot the ^ to anchor the grep pattern to the start of the line. D'oh!
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/