[ubuntu-uk] killed box through /var :P

Neil Greenwood neil.greenwood.lug at gmail.com
Mon Jan 19 08:38:39 GMT 2009


2009/1/18 William Anderson <neuro at well.com>:
> Neil Greenwood wrote:
>> [snip]
>>
>> Have a look at http://blog.hanno-stock.de/archives/50 for a few extra
>> steps that will mark libraries and dependencies as automatically
>> installed (then they get removed when you choose to remove the package
>> you originally installed, instead of becoming cruft).
>
> But Ubuntu et al automatically pick up on orphaned packages and offer
> apt-get autoremove to get rid of them, or did I miss a memo somewhere?
>
> -n
>
> --
> ubuntu-uk at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
> https://wiki.ubuntu.com/UKTeam/
>

You are correct, but the process you describe to reinstall desired
packages after reinstalling Ubuntu loses the list of dependant
packages.

I.e. If I am running hardy, and
 apt-get install foo
where foo depends on bar, apt-get will install both foo and bar,
marking bar as automatically installed.
If I then
 apt-get remove foo
both foo and bar get removed (as long as nothing else has been
installed after foo that also uses bar). There might be a prompt to
remove automatic packages, I can't remember exactly.

However, if I don't remove foo, install intrepid and then do
 dpkg --set-selections < /media/disk/hardy-packages.txt
both foo and bar are marked as manually installed (you've just told
apt-get to install bar directly since it's included in
hardy-packages.txt). If you now
 apt-get remove foo
only foo will get removed. apt-get and dpkg think you still want bar
installed, even though nothing is currently using it.

Look at the link I included above, and it only puts packages you
manually installed into the list of packages passed to dpkg
--set-selections.

Hopefully this has cleared up any confusion. If not, ask again!

Cofion,
Neil.



More information about the ubuntu-uk mailing list