[master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

Bug #150252 reported by Volans
118
This bug affects 14 people
Affects Status Importance Assigned to Milestone
tasksel (Ubuntu)
Fix Released
High
Colin Watson
Hardy
Fix Released
High
Colin Watson
Intrepid
Fix Released
High
Colin Watson
Jaunty
Fix Released
High
Colin Watson

Bug Description

When removing tasks, tasksel simply removes all packages listed for that task. This fails badly in some cases because many tasks have substantial overlap, so removing one task can inadvertently take out others. This is compounded because sometimes tasksel believes that a task is to be removed when it isn't, particularly when tasks share key packages.

I fixed this in tasksel 2.73ubuntu17 in Jaunty, with a further performance optimisation in 2.73ubuntu18. I'm proposing this pair of changes as stable updates. Here are the changes made in Jaunty:

  http://bazaar.launchpad.net/~ubuntu-core-dev/tasksel/ubuntu/revision/1402
  http://bazaar.launchpad.net/~ubuntu-core-dev/tasksel/ubuntu/revision/1406

Here are the changes for hardy-proposed and intrepid-proposed. Note that I'm fixing bug 236257 at the same time because it contributes to this problem: the clashing descriptions can make tasksel incorrectly believe that one or the other task is to be removed.

  http://bazaar.launchpad.net/~ubuntu-core-dev/tasksel/hardy-proposed/revision/1354?compare_revid=1349

  http://bazaar.launchpad.net/~ubuntu-core-dev/tasksel/intrepid-proposed/revision/1388?compare_revid=1383

TEST CASE: On Hardy, an easy way to verify this is to install the mail-server and print-server tasks, and then use 'sudo tasksel -t' to test removal of just one of those tasks; the openssl package is common to both, so if this bug is present then it will be removed even if you only remove one of mail-server or print-server. On Intrepid, you can conduct the same test by installing the openssh-server and virt-host tasks; the openssh-server package is common to both. I would recommend also conducting a test similar to that in the original report, namely on a system with the ubuntu-desktop task installed; try installing and removing tasks with 'sudo tasksel -t' and make sure that the commands produced are reasonable representations of what you asked for.

I can't think of a great deal in the way of regression potential outside the scope of things that will be tested as part of verifying this update. tasksel is not all that widely used outside initial installation.

Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

I can confirm this as it almost just happened to me (I hit ctl-c quick enough that I only lost 6 packages).

My test case:
sudo tasksel
select LAMP
deselect ubuntu-desktop, and print server (why? because it asks "what do you want to install" not "what do you want to install and also keep installed")
proceed, lose your desktop.

Changed in tasksel:
status: New → Confirmed
Emmet Hikory (persia)
Changed in tasksel:
importance: Undecided → High
Revision history for this message
Patrick Hoskins (captlogic) wrote : Removed alot of packages, not sure what's the connection between them

I ran the following from the command line

patrick@berlin:/etc/apache2$ sudo tasksel remove lamp-server

And I got back... (I've edited the response for length, the complete output is in the attachemnt.

Use of uninitialized value in concatenation (.) or string at /usr/bin/tasksel line 369.
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  vmware-server-kernel-modules-2.6.22-14 libopenexr2c2a libofx3 gnustep-base-common libarts1c2a libtwolame0 libartsc0

...

  libdvdnav4 libroboradio0c2 anyevent-perl libiso9660-4 libxcomposite-dev libgdk-pixbuf2-ruby1.8 libmozjs0d
  libxrandr-dev libxvmc1 libffcall1 libevent-perl libgtk2-ruby1.8 libboost-filesystem1.34.1 pmount libmodplug0c2
  celestia-common libpulse0 libtar libobjc1 python-elementtree libuninameslist0 libgladeui-1-common liblua50
  libruby1.8 libxfixes-dev mkisofs miro-data libimlib2 guile-1.6-slib libxcb-shm0 libxinerama-dev gnucash-common
  libvcdinfo0 libebml0 libgtkglext1 libpango1-ruby1.8 libmatroska0 libnjb5 quanta-data libxine1-console
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  abiword-gnome agave alacarte apache2 apache2-mpm-prefork apache2-utils apache2.2-common apport apport-gtk apturl
  at-spi audacity avant-window-navigator-bzr awn-core-applets-bzr banshee bluefish bluez-cups bluez-gnome bluez-utils

...

  totem-xine tracker tracker-search-tool transcode tsclient ubufox ubuntu-desktop ubuntu-docs update-manager
  update-notifier vcdimager vino vlc vlc-nox vmware-server wine xaralx xine-ui xsltproc yelp zenity
0 upgraded, 0 newly installed, 365 to remove and 4 not upgraded.
Need to get 0B of archives.
After unpacking 1525MB disk space will be freed.
(Reading database ... 147440 files and directories currently installed.)
Removing abiword-gnome ...
Removing agave...

Changed in tasksel:
status: Confirmed → Triaged
Revision history for this message
Mamsaac (dormam) wrote : Re: tasksel remove all Ubuntu-desktop dependencies without confirmation dialog

Exactly the same things told and explained by others, I just had several packages removed in Ubuntu when trying to remove lamp-server using tasksel... I will have to do a full reinstall of Ubuntu, which is a real pain... I was in a rush, so I just told tasksel what to do and later I realized what was happening. Hope this gets fixed.

Revision history for this message
nine (niin-deactivatedaccount-deactivatedaccount) wrote :

Very similar bugs, but not setting them as duplicates yet: I'm not sure whether they are real duplicates, as they have different tasksel versions and/or mention different tasks:
bug 250287
bug 131202
bug 141602

Revision history for this message
dennyhalim.com (mail2dny) wrote :

same thing here. the latest updated hardy.

i do:
sudo tasksel remove xubuntu-desktop

and it also remove skype opera ssh server and many many more that i install before xubuntu-desktop is installed.
almost everything but the shell is gone...

Revision history for this message
nine (niin-deactivatedaccount-deactivatedaccount) wrote : Re: [master] tasksel remove all Ubuntu-desktop dependencies without confirmation dialog

The 3 bugs I mentioned above plus a new bug 262128 have been marked as duplicates of this bug by me.

description: updated
Changed in tasksel:
milestone: none → intrepid-updates
Revision history for this message
Felix Oghină (felix.oghina) wrote :

I can confirm this bug in Intrepid. Running sudo tasksel remove lamp-server removes the desktop and other packages (so far I just reinstalled ubuntu-desktop and everything seems ok).

Revision history for this message
Dan May (dmay) wrote :

Me too...

Colin Watson (cjwatson)
Changed in tasksel:
assignee: nobody → kamion
Colin Watson (cjwatson)
Changed in tasksel (Ubuntu Jaunty):
milestone: intrepid-updates → none
status: Triaged → In Progress
Colin Watson (cjwatson)
Changed in tasksel (Ubuntu Hardy):
assignee: nobody → cjwatson
importance: Undecided → High
milestone: none → ubuntu-8.04.3
status: New → Triaged
Changed in tasksel (Ubuntu Intrepid):
assignee: nobody → cjwatson
importance: Undecided → High
milestone: none → intrepid-updates
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tasksel - 2.73ubuntu17

---------------
tasksel (2.73ubuntu17) jaunty; urgency=low

  * Avoid removing packages that are in other tasks that are still selected
    or not displayed (LP: #150252).
  * Update Ubuntu tasks from seeds, adjusting description of mobile-live.

 -- Colin Watson <email address hidden> Mon, 16 Mar 2009 17:27:44 +0000

Changed in tasksel:
status: In Progress → Fix Released
Revision history for this message
Bill Smith (bsmith1051) wrote :

this bug was not fixed soon enough to save me just now...
I'm running 8.10 so this apparently hasn't been released yet? and, why is this marked Urgency:Low, when it can wipe-out your entire installation?

Revision history for this message
Colin Watson (cjwatson) wrote :

No, sorry, we haven't done updates for older release yet.

And, err, it isn't marked Low, it's marked High.

Revision history for this message
inksmithy (inksmithy) wrote : Re: [Bug 150252] Re: [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

This bug was fixed in the package tasksel - 2.73ubuntu17

---------------
tasksel (2.73ubuntu17) jaunty; *urgency=low*

 * Avoid removing packages that are in other tasks that are still selected
   or not displayed (LP: #150252).
 * Update Ubuntu tasks from seeds, adjusting description of mobile-live.

2009/3/23 Colin Watson <email address hidden>

> No, sorry, we haven't done updates for older release yet.
>
> And, err, it isn't marked Low, it's marked High.
>
> --
> [master] tasksel removes all Ubuntu-desktop dependencies without
> confirmation dialog
> https://bugs.launchpad.net/bugs/150252
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 150252] Re: [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

On Tue, Mar 24, 2009 at 07:35:20AM -0000, inksmithy wrote:
> tasksel (2.73ubuntu17) jaunty; *urgency=low*

Oh, well, that's completely irrelevant so who cares? The only purpose of
the urgency field in Ubuntu is to cause the source package to be
scheduled for building marginally quicker. As a result it's almost
always just set to the default, and so people shouldn't waste time by
worrying about its value.

Revision history for this message
inksmithy (inksmithy) wrote : Re: [Bug 150252] Re: [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

Well with all due respect, how is the average user (like me) supposed
to evaluate it? I would suggest that if two people involved with the
same bug have made the mistake of paying attention to an irrelevant
(should that be "redundant and pointless") rating, there are probably
quite a few more out there. I know this isn't your fault, but wouldn't
it be worthwhile having a useful rating there rather than something
nobody apparantly takes notice of?

On 3/24/09, Colin Watson <email address hidden> wrote:
> On Tue, Mar 24, 2009 at 07:35:20AM -0000, inksmithy wrote:
>> tasksel (2.73ubuntu17) jaunty; *urgency=low*
>
> Oh, well, that's completely irrelevant so who cares? The only purpose of
> the urgency field in Ubuntu is to cause the source package to be
> scheduled for building marginally quicker. As a result it's almost
> always just set to the default, and so people shouldn't waste time by
> worrying about its value.
>
> --
> [master] tasksel removes all Ubuntu-desktop dependencies without
> confirmation dialog
> https://bugs.launchpad.net/bugs/150252
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

--
Sent from my mobile device

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 150252] Re: [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

On Tue, Mar 24, 2009 at 10:13:38AM -0000, inksmithy wrote:
> Well with all due respect, how is the average user (like me) supposed
> to evaluate it? I would suggest that if two people involved with the
> same bug have made the mistake of paying attention to an irrelevant
> (should that be "redundant and pointless") rating, there are probably
> quite a few more out there. I know this isn't your fault, but wouldn't
> it be worthwhile having a useful rating there rather than something
> nobody apparantly takes notice of?

The useful rating is the one in the Priority field of this bug. I'm
sorry, I can't make the world perfect all at once!

Revision history for this message
Anon Sricharoenchai (anon-hui) wrote : Re: [Bug 150252] Re: [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

On 3/17/09, Launchpad Bug Tracker <email address hidden> wrote:
> This bug was fixed in the package tasksel - 2.73ubuntu17
>
> ---------------
> tasksel (2.73ubuntu17) jaunty; urgency=low
>
> * Avoid removing packages that are in other tasks that are still selected
> or not displayed (LP: #150252).

How is it resolved?
It is resolved in what way?

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 150252] Re: [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

On Tue, Mar 24, 2009 at 12:47:01PM -0000, Anon Sricharoenchai wrote:
> On 3/17/09, Launchpad Bug Tracker <email address hidden> wrote:
> > tasksel (2.73ubuntu17) jaunty; urgency=low
> >
> > * Avoid removing packages that are in other tasks that are still selected
> > or not displayed (LP: #150252).
>
> How is it resolved?
> It is resolved in what way?

In the way described above, although currently only in the "Jaunty"
development release. If you mean something other than that, then I don't
understand your question.

Revision history for this message
Anon Sricharoenchai (anon-hui) wrote : Re: [Bug 150252] Re: [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

I mean, it is resolved by,
1. changing the program logic in tasksel?, or by
2. remove the common and/or library packages from the tasks (such as,
lamp task)?

On 3/24/09, Colin Watson <email address hidden> wrote:
> On Tue, Mar 24, 2009 at 12:47:01PM -0000, Anon Sricharoenchai wrote:
> > On 3/17/09, Launchpad Bug Tracker <email address hidden> wrote:
>
> > > tasksel (2.73ubuntu17) jaunty; urgency=low
> > >
> > > * Avoid removing packages that are in other tasks that are still selected
> > > or not displayed (LP: #150252).
> >
> > How is it resolved?
> > It is resolved in what way?
>
>
> In the way described above, although currently only in the "Jaunty"
> development release. If you mean something other than that, then I don't
> understand your question.
>
>
> --
> [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog
> https://bugs.launchpad.net/bugs/150252
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 150252] Re: [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

On Tue, Mar 24, 2009 at 02:32:14PM -0000, Anon Sricharoenchai wrote:
> I mean, it is resolved by,
> 1. changing the program logic in tasksel?, or by
> 2. remove the common and/or library packages from the tasks (such as,
> lamp task)?

(1). I fixed the logic in tasksel to avoid removing packages when
they're still required by other installed tasks. Option (2) would have
been rather more difficult to maintain and isn't necessary.

Revision history for this message
Anon Sricharoenchai (anon-hui) wrote : Re: [Bug 150252] Re: [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

On 3/24/09, Colin Watson <email address hidden> wrote:
> On Tue, Mar 24, 2009 at 02:32:14PM -0000, Anon Sricharoenchai wrote:
> > I mean, it is resolved by,
> > 1. changing the program logic in tasksel?, or by
> > 2. remove the common and/or library packages from the tasks (such as,
> > lamp task)?
>
>
> (1). I fixed the logic in tasksel to avoid removing packages when
> they're still required by other installed tasks. Option (2) would have
> been rather more difficult to maintain and isn't necessary.
>

Why is it difficult to maintain?
Just put the final (leaf) packages in the task, for example,
lamp task could only consist of,

   apache, mysql-server, php,

rather than,

   apache, apache-common, mysql-server, mysql-common, libmysql, ...

Is there any problem with this approach?

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 150252] Re: [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

On Wed, Mar 25, 2009 at 04:43:12AM -0000, Anon Sricharoenchai wrote:
> Why is it difficult to maintain?
> Just put the final (leaf) packages in the task, for example,
> lamp task could only consist of,
>
> apache, mysql-server, php,
>
> rather than,
>
> apache, apache-common, mysql-server, mysql-common, libmysql, ...
>
> Is there any problem with this approach?

Yes, it wouldn't work for Ubuntu. We don't maintain our task data by
hand like this; we maintain it automatically using the output of
germinate, which expands out dependencies very carefully taking a number
of things into account. For example, packages that are explicitly part
of "inner" seeds such as the base system are installed preferentially.

If you only put the root packages in the task, then you would rely on
tasksel expanding out dependencies in the "correct" way. It wouldn't
just be able to feed them to apt as some of these situations are very
complex, especially when virtual packages are involved and we have to
choose which Provides to pick, and apt's dependency resolver doesn't
always get these "right" (where "right" is defined as "matching the
current behaviour" since we're pretty happy with the current output)
without help. Task expansion would no longer be the role of a single
program (germinate) but instead would be spread across several wobbly
piles of software; the net result would be that Ubuntu's tasks would
become more fragile and harder for us to maintain, for no added value to
users.

Feel free to continue this discussion on a mailing list such as
<email address hidden>. It is not relevant to this bug
report, because the bug has already been fixed in a different way.

Colin Watson (cjwatson)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted tasksel into intrepid-proposed; please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in tasksel (Ubuntu Intrepid):
status: Triaged → Fix Committed
tags: added: verification-needed
Changed in tasksel (Ubuntu Hardy):
status: Triaged → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted tasksel into hardy-proposed; please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Andreas Olsson (andol) wrote :

I can confirm that tasksel 2.73ubuntu11.1 (intrepid-proposed) and tasksel 2.70ubuntu6 (hardy-proposed) does the trick. In Intrepid I can now remove virt-host without it removing openssh-server and in Hardy I can now remove print-server without mail-server getting removed.

I've also verified it against ubuntu-desktop (Hardy and Intrepid). Removing print-server (or at least trying) will not longer take ubuntu-desktop with it.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tasksel - 2.73ubuntu11.1

---------------
tasksel (2.73ubuntu11.1) intrepid-proposed; urgency=high

  * Backport from jaunty:
    - Avoid removing packages that are in other tasks that are still
      selected or not displayed (LP: #150252).
  * Fix kubuntu-kde4-live task to avoid description clash with kubuntu-live
    (LP: #236257).

 -- Colin Watson <email address hidden> Wed, 25 Mar 2009 12:02:55 +0000

Changed in tasksel (Ubuntu Intrepid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tasksel - 2.70ubuntu6

---------------
tasksel (2.70ubuntu6) hardy-proposed; urgency=high

  * Backport from jaunty:
    - Avoid removing packages that are in other tasks that are still
      selected or not displayed (LP: #150252).
  * Fix kubuntu-kde4-live task to avoid description clash with kubuntu-live
    (LP: #236257).

 -- Colin Watson <email address hidden> Wed, 25 Mar 2009 11:59:25 +0000

Changed in tasksel (Ubuntu Hardy):
status: Fix Committed → Fix Released
Revision history for this message
Bill Smith (bsmith1051) wrote :

FYI - I just received this update today for Intrepid, via Update Manager. Yeah!

Revision history for this message
jake dalton (jacobrdalton) wrote :

I can confirm this bug in Karmic 9.10. Mine is an amd64 install of Kubuntu and my desktop no longer exists.

Revision history for this message
CVirus (cvirus) wrote :

Confirmed for karmic here as well ... sudo tasksel remove lamp-server just removed lots of packages ... will check the dpkg.log and see if I can re-install everything again :-(

Revision history for this message
SilvaRizla (silvarizla5) wrote :

Bug still present. Just trashed my kubuntu 9.10 box. Days of my life wasted.

Revision history for this message
BlueWolf (josr91) wrote :

Bug is still present in Karmic. I removed 'print-server' from tasksel and it removed the entire ubuntu-desktop and all it's dependencies (basically all the GUI apps). It looked the same as if / got removed.

I fixed it by reinstalling ubuntu-desktop and all my programs again. Luckily, almost all my configurations where saved.

Revision history for this message
tapir (cosku-bas-deactivatedaccount) wrote :

this bug is still present in Lucid.

tasksel is dangerous and shouldn't be used. also tasksel looks like the standard way of installing lamp-server in ubuntu wiki but it shouldn't be because when removing packages it wipes the system. is there anything more dangerous than that? why are we still using this application? why does it come preinstalled? why we don't use metapackages instead of this?

Revision history for this message
Itang Sanjana (itang.sanjana) wrote :

God! I just found this page after run the famous 'tasksel remove lamp-server' today (under 10.04 Lucid Lynx).
Not only ubuntu-desktop, I also wipeout my ssh-server, mail-server and their dependencies.
Really really dangerous, don't try this at /home.
sometimes 'man page' just ain't enough ..

Revision history for this message
Nogero (oregonbob) wrote :

There needs to be a HUGE warning that "tasksel" is dangerous and should not be used. I just blew away a system today because I wanted to add dns server to a desktop system. This bug is so bad it should be considered a security vulnerability.

I put a checkmark on "Add DNS server" and hit OK. Then I notice down on the status line that it is "Removing gnome....." and so on. No prompts, No warnings, No nothing. Clearly the program does not do what it says it is doing!

I did this on a Mint 8 of Ubuntu Karmic. I was doing this remotely and lost all contact with the host after "tasksel" did its nightmare!

Revision history for this message
Kyle Falconer (kyle-falconer) wrote :

This is still a problem. I'm running a clean install of ubuntu server 10.10, selecting the DNS, Virtualisation Host, Samba, and Open SSH. I later installed mediatomb and vlc, configured those programs, and then decided that I needed to remove the virtual host machine. I sat and watched as all my work got removed, without prompt. So frustrating.

Revision history for this message
graingert (tagrain) wrote :

I thought this was fix released?

Revision history for this message
graingert (tagrain) wrote :

yes tasksel will still remove ubuntu-desktop in ubuntu natty

Revision history for this message
Brian Murray (brian-murray) wrote :

graingert - Could you elaborate as to how you went about recreating this in Natty. I've tried adding and removing multiple tasks with tasksel in Natty and was never saw ubuntu-desktop removed.

Revision history for this message
Bárbara Jiménez (bas-) wrote :

This bug is still present in Ubuntu Trusty... Almost eight years later!
I just wanted to install LAMP and now I find myself reinstalling all the packages that tasksel decided to remove. Long work ahead configuring everything again.
No need to say that this is unbelievable, tasksel should be either fixed or remove from the repositories.

Revision history for this message
Telefo (buonprezzo) wrote :

I can confirm that this bug is still present in Ubuntu 16.04. It's a very annoying behavior!!!

Revision history for this message
inksmithy (inksmithy) wrote : Re: [Bug 150252] Re: [master] tasksel removes all Ubuntu-desktop dependencies without confirmation dialog

I've been subscribed to this bug for 8 years. It's like an old friend to me
now.

On 7 December 2016 at 15:20, Telefo <email address hidden> wrote:

> I can confirm that this bug is still present in Ubuntu 16.04. It's a
> very annoying behavior!!!
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (262128).
> https://bugs.launchpad.net/bugs/150252
>
> Title:
> [master] tasksel removes all Ubuntu-desktop dependencies without
> confirmation dialog
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/tasksel/+bug/
> 150252/+subscriptions
>

Revision history for this message
Yehezkel Bernat (yehezkelshb) wrote :

Still happens on Ubuntu 18.10. I removed openssh-server and noticed a lot of dependencies of ubuntu-desktop removed. Running "apt install ubuntu-desktop" after it installed 270 packages.

Revision history for this message
Florian Bachmann (florian-bachmann) wrote :

Still happens on Ubuntu 20.04.
I have put a warning in the German wiki.ubuntuusers.de.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.