[ubuntu-uk] Ending Dual-Boot

Neil Greenwood neil.greenwood.lug at gmail.com
Tue Mar 11 07:08:03 UTC 2014

On 10 March 2014 16:38:47 GMT, Daniel Llewellyn <diddledan at gmail.com> wrote:
>On 10 March 2014 16:38, Daniel Llewellyn <diddledan at gmail.com> wrote:
>> dpkg -l | grep '^i'
>> --
>> dpkg -l (lowercase L) lists all packages that are installed or
>> known to the system (such as those packages you've removed but not
>> To filter the list to just installed packages we pipe the output
>> the | character which is shift+\) to grep which checks for lines
>> (^) with the letter "i" which is what dpkg -l outputs for installed
>> packages.
>> On 9 March 2014 17:34, Peter Smout <smoutpete at gmail.com> wrote:
>sorry, I failed and top-posted :-(
>Daniel Llewellyn
>ubuntu-uk at lists.ubuntu.com

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.

Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-uk/attachments/20140311/a4810248/attachment-0001.html>

More information about the ubuntu-uk mailing list