Manually removing Email packages

NethServer Version: 7.9.2009
Module: Email

I am using NethServer in a VM under FreeNAS system. It is allocated 512MB RAM as its main purpose is simple routing for my home network.

I have installed “Email” from Applications to test and see what I can do with it. Now, I checked all I want and I would like to remove everything related with these packages installed.

I login as root, go to Applications, click on hamburger menu, choose remove
At that point all I see is
That screen stays like forever and never complete what ever it is doing. I can click Cancel button and screen goes off. Delete button is not enabled and cannot be clicked. When I click cancel Email stays installed. I do not have a lot of packages installed.

I already tried to install all updates including the one released today. Unfortunately, I could not remove Email from my system using GUI.

Now, I would like to do that using command prompt. I do not know what package(s) I should be removing and exact command line with parameters.

Any help is appreciated.

Thanks & Regards,

Did you check over there?

This is what i see on my Applications section of Cockpit

This is what I tried to explain in my message. This “Remove” you shared. Gives me a screen in my initial post. That screen never changes. Stays like that for even 24 hours.

AFAIK some shell command should do the trick. But summoning @dev_team may be a nice addiction.

rpm -qa | grep -i 'nethserver-mail'

If the stack email is installed you can remove it manually, only nethserver-mail-smarthost must stay

yum remove nethserver-mail-server nethserver-mail-common nethserver-mail-filter

after that you can do a

yum auto remove

it removes all rpm without require by other rpm, check the list before to press yes


That did the trick.

Thank you.

1 Like

thx for help, i had exatkly same endless loading screen…

Any ideas on how this behavior is caused or what is being done to solve this?
Shouldn’t a software update have fixed this by now?

sorry I do not understand, you should open your topic and explain what is wrong

What I’m wondering is why a “dirty fix” which involves manually putting console commands in the terminal hasn’t been resolved to work with the intended way to remove the email package.

So the situation is:

The UI doesn’t function properly when trying to remove the Email package.
A workaround is to remove the packages manually with the terminal.
The UI hasn’t been updated to adaquately resolve the original problem.

CC @giacomo we have a valid bug, when we press the remove button the UI hangs on the nethserver-mail removal

 echo '{"action":"list-removed","packages":["nethserver-mail"]}' | /usr/bin/sudo /usr/libexec/nethserver/api/system-packages/read | jq

In the terminal we have

  echo '{"action":"list-removed","packages":["nethserver-mail"]}' | /usr/bin/sudo /usr/libexec/nethserver/api/system-packages/read | jq
No Match for argument: nethserver-mail
  "packages": []

1 Like

The API uses a command implemented ages ago for NethGUI.
Just a guess: maybe it is working only with packages where the name is the same of the belonging group. In this case, the fix should be just adding @ in this line before the $packages variable.


we use [], maybe we could switch to [app.provides] because we have no information if it is a group of rpm we remove or if it just one rpm

    "id": "nethserver-mail",
    "provides": [

It took a while, but this should be fixed: Cockpit: application removal could be broken · Issue #6645 · NethServer/dev · GitHub

Would you give it a try @ertank @dasuberadmin ?

1 Like

Thanks for the reply, how should I acquire the fix?

I don’t see any available updates in the software center

Just execute:

yum --enablerepo=nethserver-testing update nethserver-cockpit\*

Updated cockpit and tried to remove the Email package.

It exited with an error stating I should run system-packages/update and post the results here. However when running the command in the terminal it just exited with a success state:

[root@proxy ~]#  echo '{"action":"remove","packages":["nethserver-mail-common","nethserver-mail-filter","nethserver-mail-getmail","nethserver-mail-server"]}' | /usr/bin/setsid /usr/bin/sudo /usr/libexec/nethserver/api/system-packages/update | jq
  "state": "running",
  "steps": -1,
  "event": "Initialization"
  "state": "running",
  "steps": -1,
  "event": "Resolving RPM dependencies"
  "state": "running",
  "steps": -1,
  "event": "Downloading Packages"
  "state": "running",
  "steps": -1,
  "event": "Running Test Transaction"
  "state": "running",
  "steps": -1,
  "event": "Running Transaction"
  "status": "success",
  "steps": -1,
  "event": "Transaction end"
  "state": "success"
[root@proxy ~]#

When refreshing the Application list I also noticed that the Email package disappeared so I guess all is good (?)

I’m currently trying to reinstall the Email package so I can remove it again and see if I get the same error.


When I first tried to remove the Email package the following command was executed:

/usr/bin/python /usr/libexec/nethserver/pkgaction --json --remove nethserver-mail-common,nethserver-mail-filter,nethserver-mail-getmail,nethserver-mail-server

After reinstalling the Email package and trying to remove it I now see that only 3 packages will be uninstalled:


The nethserver-mail-getmail is nowhere to be found. Is this by design or did I mess something up?

[EDIT 2]

Removing those 3 packages via cockpit throws above mentioned error, stating I should run the command on the CLI and post the results here.

Strange :thinking:

Ok, this is the correct one

I will check, thanks

Is this the error you can find inside /var/log/messages?

Mar 10 11:41:58 nscomm systemd: Stopping clamd scanner (rspamd) daemon...
Mar 10 11:41:58 nscomm systemd: Stopped clamd scanner (rspamd) daemon.
Mar 10 11:41:58 nscomm systemd: Starting clamd scanner (rspamd) daemon...
Mar 10 11:41:58 nscomm clamd: ERROR: Can't open/parse the config file /etc/clamd.d/rspamd.conf
Mar 10 11:41:58 nscomm systemd: clamd@rspamd.service: control process exited, code=exited status=1
Mar 10 11:41:58 nscomm systemd: Failed to start clamd scanner (rspamd) daemon.
Mar 10 11:41:58 nscomm systemd: Unit clamd@rspamd.service entered failed state.
Mar 10 11:41:58 nscomm systemd: clamd@rspamd.service failed.
Mar 10 11:41:58 nscomm esmith::event[16949]: Job for clamd@rspamd.service failed because the control process exited with error code. See "systemctl status clamd@rspamd.service" and "journalctl -xe" for details.
Mar 10 11:41:58 nscomm esmith::event[16949]: Action: /etc/e-smith/events/nethserver-antivirus-update/S30nethserver-antivirus-init-avdb FAILED: 1 [0.182286]
Mar 10 11:41:58 nscomm esmith::event[16949]: Event: nethserver-antivirus-update FAILED

It’s another problem, due to a corner case. I could fix, but it’s not relevant to the UI behavior.

Thanks for testing!

Edit: fixed also this one (see Clamd@rspamd in failed state after mail application removal · Issue #6647 · NethServer/dev · GitHub), thanks to @stephdl !


Sorry for the delay. I am indeed seeing that specific clamd error.

Updating to nethserver-antivirus-1.5.2-1 fixed the issue! Thanks for the help!

1 Like