Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Whenever I install software from the command-line using apt-get or aptitude, I see messages like this:

Selecting previously deselected package foobar-cil-dev.

I understand "downloading" and "setting up", but what does "selecting" mean? And what does it mean that the package was "previously deselected"?

share|improve this question
add comment

2 Answers 2

up vote 13 down vote accepted

Ubuntu comes with a default set of packages installed and the package manager track those packages. If you remove a package that is installed by default, it becomes marked as "deselected". This means it was installed previously, but has been removed. In fact any package that you install and then remove becomes marked as "deselected".

This is useful for example to replicate the same packages you have on another machine or after a clean install. You can generate a list of "selected" and "deselected" packages on your system using the package manager and then load this list on another machine, which will make the package manager on it to install all "selected" and uninstall the ones marked as "deselected".

To replicate your packages selection on another machine (or restore it if re-installing), you can run this:

dpkg --get-selections > ~/my-packages

Then move the file "my-packages" to the other machine, and there run:

sudo dpkg --set-selections < my-packages && sudo apt-get dselect-upgrade

When you run the command above, all packages that were marked as "selected" will be installed in a batch and all packages marked as "deselected" will be removed, if present. This is a very handy feature.

share|improve this answer
add comment

It's a grammatical error. It should say "unselected". There is a subtle distinction in English here which the programmer may have been unaware of: "deselected" means it was selected at some previous time, but isn't now. "Unselected" simply means it wasn't ever selected before (or at least, not relevantly). Using "deselected" here is confusing, and should be corrected.

share|improve this answer
1  
According to the accepted answer, the term deselected is used correctly. –  Mei Nov 22 '11 at 1:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.