I was looking through the list of packages with
dselect, but pressed Return twice by mistake, thereby making it confirm and quit the
When I go to the
[I]nstall option, it's now suggesting to install a number of new packages that I don't want (and that have nothing to do with what I was looking for in the first place).
Since I haven't proceeded with the installation itself, is there a way to reset the selection to what it was before I selected new packages, without going through the list one by one and pressing
- for each package? (It doesn't matter if it's done via
dselect or via another related command.)
EDIT: (Adding an example)
I've tried on another machine where
dselect is installed. Let's assume that package
gnugo isn't installed (that's just an example).
[S]electto get the list.
- Search for
gnugoin this list (using /, if you're not familiar with
- Select it with +.
- Press Return to validate the suggestions and Return again to validate go back to the main menu (the mistake I made).
[I]nstall. It will now say:
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed gnugo:i386 libgpm2:i386 libncurses5:i386 libreadline6:i386 libtinfo5:i386 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 1,926 kB of archives. After this operation, 9,634 kB of additional disk space will be used. Do you want to continue [Y/n]?
Here, choose not to continue (
dpkg --get-selections | grep gnugoyields nothing at all.
dselectagain, go straight to
[I]nstallagain, the packages will still be selected for installation.
Of course, I can go back into the
[S]elect list, search for
gnugo, press _ to deselect it, but in a more complex case, you may have to go through the new packages list one by one.
dselect is visibly a front-end to
apt-get install, but I'm not sure where it gets its selection from. It appears
dpkg --get-selection is not it.
As far as
dselect is concerned, I'd like to reset it in a state where everything maked with
*** stays at it was, but what's now marked with only
** (and not installed yet) goes back to
__, without having to go manually through the suggested list from the
This is clearly related to the content of
/var/lib/dpkg/status, which contains this entry:
Package: gnugo Status: install ok not-installed Priority: optional Section: games
If I change this manually to
Status: deinstall ok not-installed, it disappears from the selection in
dselect (which makes sense).
What I would like is a general way of turning whatever says
Status: install ok not-installed into
Status: deinstall ok not-installed (leaving packages saying
Status: install ok installed unaffected).