33

enter image description hereenter image description hereThe looping of Evolution factories slow the system to sudden and lengthy halts. When I access the System Monitor I can stop the individual processes that cause the problem. These processes are as follows;

evolution-source-registry

notably, evolution-addressbook-factory

Once evolution-addressbook-factory is stopped the processes are eventually replaced by similarly named processes, but the looping stops. When I connect to Thunderbird it slows substantially. Initially I used evolution mail when running Ubuntu 12.10 but removed it and have been using Thunderbird.

My laptop specs are:
Ubuntu 13.04 32-bit
2.0 GHz (dual core, both cores at 2.0 GHz)
1GB RAM After carrying out the recommended procedures for complete removal I recieved a cache read error after removing evolution from the package manager entirely. Re-downloading the packages in the package manager enabled email recognition and produced the error seen in the screenshot.

lightning
  • 663

9 Answers9

38

Removing is too messy (because a lot of other packages depend on it even if they don't use its functionality), but disabling is relatively straightforward.

Ideally this should be done using dpkg-divert (but that has a problem with diverting to the same file), to not confuse apt/dpkg when you upgrade your system.

cd /usr/share/dbus-1/services
# This part create a copy of your original files
sudo cp org.gnome.evolution.dataserver.AddressBook.service org.gnome.evolution.dataserver.AddressBook.service.backup
sudo cp org.gnome.evolution.dataserver.Calendar.service org.gnome.evolution.dataserver.Calendar.service.backup
sudo cp org.gnome.evolution.dataserver.Sources.service org.gnome.evolution.dataserver.Sources.service.backup
sudo cp org.gnome.evolution.dataserver.UserPrompter.service org.gnome.evolution.dataserver.UserPrompter.service.backup

# This part does the trick
sudo ln -snf /dev/null org.gnome.evolution.dataserver.AddressBook.service
sudo ln -snf /dev/null org.gnome.evolution.dataserver.Calendar.service
sudo ln -snf /dev/null org.gnome.evolution.dataserver.Sources.service
sudo ln -snf /dev/null org.gnome.evolution.dataserver.UserPrompter.service

If we just delete the file or use any empty file the next update/upgrade will put them back. So we're using a symlink to an empty file (/dev/null is a special empty file, it stays empty even if you write something into it).

Here you find an article about what /dev/null is.

PAStheLoD
  • 571
18

To remove Evolution, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get --purge remove evolution evolution-exchange evolution-plugins evolution-common evolution-webcal

The above command will not remove evolution-data-server, evolution-data-server-common

I would recommend that you use Synaptic Package Manager to completely remove Evolution. Just search for it, and mark it for complete removal.

Also just to be sure, after removing do:

sudo rm /usr/share/indicators/messages/applications/evolution

Now keep in mind that removing evolution, will also remove gnome panel. to install just do:

sudo apt-get install gnome-panel
Mitch
  • 109,787
10

With Ubuntu 18.04 (and probably 16.04) you can't get rid of Evolution without getting rid of GNOME, so your best bet is to disable it.

Building on PAStheLoD's answer and its comments, I wrote a script to disable the evolution services and to inform dpkg/apt of the changes so they aren't wiped out on upgrades. Hopefully, this will help those of you who, like me, script your system setup just in case you need to reinstall.

I tested this on Ubuntu 18.04.1 LTS.

#!/bin/bash

##
## Disables the Evolution mail program's services by moving the services files
## to another directory.
##
## This must be run as root.
##

SERVICES_HOME="/usr/share/dbus-1/services"
DISABLED_DIR="$SERVICES_HOME/disabled"


exitOnError()
{
    local errorCode=$1
    local errorMessage="$2"

    echo "$errorMessage"
    exit $errorCode
}


main()
{
    # Make sure that we are running as root and that the services directory didn't change!
    if ! [ $(id -u) = 0 ]; then
        exitOnError -1 "Script must be run as root or sudo.  Exiting..."
    fi

    if [ ! -d "$SERVICES_HOME" ]; then
        exitOnError -2 "Services directory $SERVICES_HOME does not exist.  Exiting..."
    fi

    mkdir -p "$DISABLED_DIR"

    find "$SERVICES_HOME" -maxdepth 1 -type f -name "org.gnome.evolution.dataserver.*" ! -name "*.bak" -printf "%f\0" | while IFS= read -r -d $'\0' servicename; do
        # Tell dpkg/apt to update the file in DISABLED_DIR instead of the one in SERVICES_HOME
        dpkg-divert --quiet --divert "$DISABLED_DIR/$servicename" --rename --add "$SERVICES_HOME/$servicename" || exitOnError -3 "Unable to divert service $servicename."

        ln -snf /dev/null  "$SERVICES_HOME/$servicename"
        echo "Disabled service $servicename"
    done

    echo "All evolution services have been disabled.  Please restart for changes to take effect."
}

main

To undo this, run the following:

sudo rm /usr/share/dbus-1/services/org.gnome.evolution.dataserver.*
sudo dpkg-divert --rename --remove /usr/share/dbus-1/services/org.gnome.evolution.dataserver.AddressBook.service
sudo dpkg-divert --rename --remove /usr/share/dbus-1/services/org.gnome.evolution.dataserver.Calendar.service
sudo dpkg-divert --rename --remove /usr/share/dbus-1/services/org.gnome.evolution.dataserver.Sources.service
sudo dpkg-divert --rename --remove /usr/share/dbus-1/services/org.gnome.evolution.dataserver.UserPrompter.service
sudo rmdir /usr/share/dbus-1/services/disabled
desilvai
  • 416
  • 4
  • 7
5

None of the above helped me, as e-addressbook-factory was continuing to run and take 99% of CPU even after the purge command. The executable lives in /usr/lib/evolution:

-rwxr-xr-x 1 root root 10544 Jul 30  2013 camel-index-control-1.2
-rwxr-sr-x 1 root mail 14664 Jul 30  2013 camel-lock-helper-1.2
-rwxr-xr-x 1 root root 27760 Jul 30  2013 e-addressbook-factory
-rwxr-xr-x 1 root root 31984 Jul 30  2013 e-calendar-factory

As a last resort I moved the folder out of the way with this:

sudo mv /usr/lib/evolution /usr/lib/evolution-fu

And now it has stopped running.

2

on Ubuntu 19.04 to stop evolution:

#!/bin/bash
chmod -x /usr/libexec/evolution-addressbook-factory
chmod -x /usr/libexec/evolution-calendar-factory
chmod -x /usr/libexec/evolution-data-server/evolution-alarm-notify
chmod -x /usr/libexec/evolution-source-registry
Soren A
  • 7,191
2
apt install gnome-session && apt purge evolution && apt autoremove
  1. part will only mark gnome-session as manually installed, so it doesn't get removed by 3rd part (gnome-core depends on gnome-session)
  2. part will remove evolution (gnome-core depends on evolution, so gnome-core will be removed as well)
  3. part will purge all packages which the system considers as not needed (without step 1 this would have removed gnome-session as well)
ksx2k19
  • 41
1

If you want to disable this stupid useless evolution process do this:

for i in /usr/libexec/evoluti*; do sudo mv $i "$i.useless"; done

This command will append a ".useless" to the binary files which make them not exists, I can guarantee you that useless stupid think will never start again.

0

Combining multiple answers here together into a common shell script:

https://github.com/mcandre/dotfiles/blob/master/evolution-services

mcandre
  • 173
-2

apt-get has a --purge option to completly remove a package.

In a terminal :

sudo apt-get remove --purge evolution
sudo apt-get autoclean

The autoclean option will make a clean in the package stocked on your system. So if you have multiple versions of a package apt-get will only keep the last one.