What does the "apt-get dselect-upgrade" command do?
When running the command
apt-get I got all the possible options and commands for apt-get. But one of these commands and definitions I have not seen before:
dselect-upgrade - Follow dselect selections
I ran the command
sudo apt-get dselect-upgrade just to see what happened and this was the output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
So what does this command actually do? And what does it mean to
Follow dselect sections?
dselect-upgrade is used in conjunction with the traditional Debian
packaging front-end, dselect(1). dselect-upgrade follows the
changes made by dselect(1) to the Status field of available
packages, and performs the actions necessary to realize that state
(for instance, the removal of old and the installation of new
So the question you’re really after is “What is
dselect?” and this used to be a way to use the capacity of Debian packages for suggesting other packages for installation back when dinosaurs used to roam the Earth. It does still work and even has its niches where it’s still used, but nowadays there are easier ways to accomplish the same thing.
For a beginner’s tutorial, look here.
As others have pointed out, it “follows dselect choices”. One nice thing about this, is one can feed a list of packages selections to dpkg:
dpkg --set-selections < package_choice_list
then do “apt-get dselect-upgrade” and it will remove anything not in the list, and install everything in the list. I don’t think any other package tool can do that. It gives one a way to ensure “these and only these” packages are installed, which is very convenient.
What I know is that
dselect is used in backing up our system.
You can also use it to install the same packages in any other system as yours.
dpkg --get-selection > packages.list This will create a list of all the packages installed in your system in the packages.list file.
Now, if something happens and your system crashes, you can install all the packages which were in your system with the help of this
dpkg --set-selections < packages.list
sudo apt-get dselect-upgrade
This will do the thing for you. It will install all the packages which were in your system before.
If you want to install same packages on your another system, then transfer this file to that system, and run those 2 commands. It will do the trick for you.