I tried to remove samba-server with this command (sudo tasksel remove samba-server) and every app even the system apps are deleted and now xubuntu is stuck at boot, just showing loading. What should I do?

Did tasksel deleted my files too?

  • Do you mean tasksel? – Organic Marble Jun 30 '18 at 17:22
  • Yes my mistake, its 'Tasksel' – Amanpreet Singh Jun 30 '18 at 17:29
  • I just tried this in a virtual machine and it did just what you described. Wow! That's a bomb waiting to go off. – Organic Marble Jun 30 '18 at 20:15
  • I'm afraid you will have to reinstall the system. I don't think it deleted your files though. – Organic Marble Jun 30 '18 at 20:17
  • 1
    But why this happened I just tried to remov Samba-server and Tasksel wiped my whole system – Amanpreet Singh Jul 1 '18 at 3:18

TL;DR - it is a serious bug


Below is available options of tasksel:

$ tasksel --help
Unknown option: help
tasksel install <task>...
tasksel remove <task>...
tasksel [options]
    -t, --test          test mode; don't really do anything
        --new-install   automatically install some tasks
        --list-tasks    list tasks that would be displayed and exit
        --task-packages list available packages in a task
        --task-desc     returns the description of a task

Samba task is named as samba-server as you wrote:

$ tasksel --list-tasks | grep -i Samba
u samba-server  Samba file server

It consists of only one package:

$ tasksel --task-packages samba-server

If we try to simulate uninstall - we get the following line:

$ sudo tasksel --test remove samba-server
debconf-apt-progress -- apt-get -q -y \
-o APT::Install-Recommends=true \
-o APT::Get::AutomaticRemove=true -o APT::Acquire::Retries=3 \ 
install samba-server^-

(in the line above the last hyphen - cause problems).

What I did:

  1. Booted Ubuntu 18.04 LTS clean VM, installed tasksel with sudo apt-get install tasksel
  2. Installed Samba with sudo tasksel install samba-server
  3. Ran sudo tasksel remove samba-server
  4. Rebooted and got broken system on next boot

Fix the system

Then I tried to repair the system:

  1. We need to boot in Recovery mode (click Shift on boot, in GRUB select Advanced options for Ubuntu, select Ubuntu, with Linux ... (recovery mode))
  2. Select resume Resume normal boot to access login shell
  3. Open first console #1 with Ctrl+Alt+1 then login
  4. If you do not have internet - check Ethernet interface name and run DHCP-client manually on it:

    ifconfig -a # got enp0s3
    sudo dhclient enp0s3
  5. Reinstall xubuntu-desktop meta-package to the system:

    sudo apt-get install xubuntu-desktop
  6. After reboot I can access the system.


So it seems that it is a serious bug - I have found some with almost same symptoms:

Also I have filed new bug 1779645 "Critical bug in tasksel: tasksel remove task-name removes whole system"

What to do?

Do not use tasksel for removing things at least on 16.04 LTS and 18.04 LTS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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