<html><head></head><body><br><br><div class="gmail_quote">On 10 March 2014 16:38:47 GMT, Daniel Llewellyn <diddledan@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 10 March 2014 16:38, Daniel Llewellyn <span dir="ltr"><<a href="mailto:diddledan@gmail.com" target="_blank">diddledan@gmail.com</a>></span> wrote:<br />

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">dpkg -l | grep '^i'<div><br /></div><div>--</div><div><br /></div><div>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.</div>


</div><div class="gmail_extra"><div class="h5"><br /><br /><div class="gmail_quote">On 9 March 2014 17:34, Peter Smout <span dir="ltr"><<a href="mailto:smoutpete@gmail.com" target="_blank">smoutpete@gmail.com</a>></span> wrote:</div>

</div></div>
</blockquote></div><br />sorry, I failed and top-posted :-(<br clear="all" /><div><br /></div>-- <br />Daniel Llewellyn
</div></div>
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail">-- <br />ubuntu-uk@lists.ubuntu.com<br /><a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk">https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk</a><br /><a href="https://wiki.ubuntu.com/UKTeam">https://wiki.ubuntu.com/UKTeam</a>/<br /></pre></blockquote></div><br>
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. <br>
<br>
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 <br>
<br>
grep i[^A] <br>
<br>
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! <br>
<br>
Although one thing you need to watch for is that you don't uninstall something you still want when removing a package... <br>
<br>
I'll dig the scripts out later and post links to paste bin.<br>
<br>
<br>
Neil<br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>