Tried Installing uninstalling then reinstalling dolibarr of different stable versions from 3.4 to 3.8. Now at sudo dpkg -i dolibarr_3.8.3-3_all.deb which results in the following errors. ... Selecting previously unselected package dolibarr. (Reading database ... 1553008 files and directories currently installed.) Preparing to unpack dolibarr_3.8.3-3_all.deb ... Unpacking dolibarr (3.8.3-3) ... Setting up dolibarr (3.8.3-3) ... Run the dolibarr config script Ask for web server to setup Run the dolibarr postinst script First install Enable php module mysqli with php5enmod Enable apache module alias with a2enmod Module alias already enabled Enable link for Apache config file with a3enconf Conf dolibarr already enabled Enable lighttpd link for dolibarr config file Ignoring unknown module: dolibarr already enabled Run /etc/init.d/lighttpd force-reload to enable changes dpkg: error processing package dolibarr (--install): subprocess installed post-installation script returned error exit status 2 Processing triggers for mime-support (3.54ubuntu1.1) ... Processing triggers for desktop-file-utils (0.22-1ubuntu1) ... Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for gnome-menus (3.10.1-0ubuntu2) ... Errors were encountered while processing: dolibarr ... Told to do these commands: lsb_release -a uname -a sudo apt-get update sudo apt-get dist-upgrade Which result in this: cabtoo@cabtoo6:~$ lsb_release -a LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch:core-4.1-ia32:core-4.1-noarch:security-4.0-ia32:security-4.0-noarch:security-4.1-ia32:security-4.1-noarch Distributor ID: Ubuntu Description: Ubuntu 14.04.3 LTS Release: 14.04 Codename: trusty cabtoo@cabtoo6:~/Downloads$ uname -a Linux cabtoo6-generic #121-Ubuntu SMP Wed Jan 20 10:50:59 UTC 2016 i686 i686 i686 GNU/Linux cabtoo@cabtoo6:~/Downloads$ Ign http://dl.google.com stable InRelease Ign http://archive.ubuntu.com trusty InRelease Ign http://archive.canonical.com precise InRelease Ign http://extras.ubuntu.com saucy InRelease Ign http://ppa.launchpad.net precise InRelease Get:1 http://archive.ubuntu.com trusty-updates InRelease [64.4 kB] Ign http://repo.vivaldi.com stable InRelease Ign http://dl.google.com stable InRelease Hit http://archive.canonical.com precise Release.gpg Hit http://extras.ubuntu.com saucy Release.gpg Ign http://ppa.launchpad.net trusty InRelease Hit http://dl.google.com stable Release.gpg Hit http://archive.canonical.com precise Release Hit http://repo.vivaldi.com stable Release.gpg Hit http://extras.ubuntu.com saucy Release Hit http://ppa.launchpad.net trusty InRelease Hit http://dl.google.com stable Release.gpg Hit http://archive.canonical.com precise/partner Sources Hit http://extras.ubuntu.com saucy/main Sources Hit http://repo.vivaldi.com stable Release Hit http://dl.google.com stable Release Hit http://ppa.launchpad.net trusty InRelease Hit http://archive.ubuntu.com trusty-backports InRelease Hit http://archive.canonical.com precise/partner i386 Packages Hit http://extras.ubuntu.com saucy/main i386 Packages Get:2 http://archive.ubuntu.com trusty-security InRelease [64.4 kB] Hit http://ppa.launchpad.net trusty InRelease Hit http://repo.vivaldi.com stable/main i386 Packages Hit http://archive.canonical.com precise/partner Translation-en Hit http://ppa.launchpad.net trusty InRelease Hit http://dl.google.com stable Release Hit http://archive.ubuntu.com trusty Release.gpg Hit http://ppa.launchpad.net trusty InRelease Hit http://dl.google.com stable/main i386 Packages Get:3 http://archive.ubuntu.com trusty-updates/main Sources [250 kB] Hit http://ppa.launchpad.net trusty InRelease Hit http://ppa.launchpad.net precise Release.gpg Hit http://dl.google.com stable/main i386 Packages Hit http://ppa.launchpad.net trusty Release.gpg Hit http://ppa.launchpad.net trusty/main i386 Packages Hit http://ppa.launchpad.net trusty/main Translation-en Get:4 http://archive.ubuntu.com trusty-updates/restricted Sources [5,359 B] Get:5 http://archive.ubuntu.com trusty-updates/universe Sources [148 kB] Hit http://ppa.launchpad.net trusty/main i386 Packages Hit http://ppa.launchpad.net trusty/main Translation-en Ign http://extras.ubuntu.com saucy/main Translation-en_AU Hit http://ppa.launchpad.net trusty/main i386 Packages Ign http://extras.ubuntu.com saucy/main Translation-en Get:6 http://archive.ubuntu.com trusty-updates/multiverse Sources [5,151 B] Hit http://ppa.launchpad.net trusty/main Translation-en Ign http://repo.vivaldi.com stable/main Translation-en_AU Hit http://ppa.launchpad.net trusty/main i386 Packages Ign http://repo.vivaldi.com stable/main Translation-en Get:7 http://archive.ubuntu.com trusty-updates/main i386 Packages [671 kB] Ign http://dl.google.com stable/main Translation-en_AU Hit http://ppa.launchpad.net trusty/main Translation-en Ign http://dl.google.com stable/main Translation-en Ign http://dl.google.com stable/main Translation-en_AU Ign http://dl.google.com stable/main Translation-en Hit http://ppa.launchpad.net trusty/main i386 Packages Hit http://ppa.launchpad.net trusty/main Translation-en Hit http://ppa.launchpad.net trusty/main i386 Packages Hit http://ppa.launchpad.net trusty/main Translation-en Hit http://ppa.launchpad.net precise Release Hit http://ppa.launchpad.net trusty Release Hit http://ppa.launchpad.net precise/main Sources Hit http://ppa.launchpad.net precise/main i386 Packages Hit http://ppa.launchpad.net trusty/main i386 Packages Get:8 http://archive.ubuntu.com trusty-updates/restricted i386 Packages [15.6 kB] Get:9 http://archive.ubuntu.com trusty-updates/universe i386 Packages [338 kB] Get:10 http://archive.ubuntu.com trusty-updates/multiverse i386 Packages [13.2 kB] Hit http://archive.ubuntu.com trusty-updates/main Translation-en Hit http://archive.ubuntu.com trusty-updates/multiverse Translation-en Hit http://archive.ubuntu.com trusty-updates/restricted Translation-en Hit http://archive.ubuntu.com trusty-updates/universe Translation-en Hit http://archive.ubuntu.com trusty-backports/main Sources Hit http://archive.ubuntu.com trusty-backports/restricted Sources Ign http://ppa.launchpad.net precise/main Translation-en_AU Hit http://archive.ubuntu.com trusty-backports/universe Sources Ign http://ppa.launchpad.net precise/main Translation-en Hit http://archive.ubuntu.com trusty-backports/multiverse Sources Hit http://archive.ubuntu.com trusty-backports/main i386 Packages Ign http://ppa.launchpad.net trusty/main Translation-en_AU Hit http://archive.ubuntu.com trusty-backports/restricted i386 Packages Ign http://ppa.launchpad.net trusty/main Translation-en Hit http://archive.ubuntu.com trusty-backports/universe i386 Packages Hit http://archive.ubuntu.com trusty-backports/multiverse i386 Packages Hit http://archive.ubuntu.com trusty-backports/main Translation-en Hit http://archive.ubuntu.com trusty-backports/multiverse Translation-en Hit http://archive.ubuntu.com trusty-backports/restricted Translation-en Hit http://archive.ubuntu.com trusty-backports/universe Translation-en Get:11 http://archive.ubuntu.com trusty-security/main Sources [103 kB] Get:12 http://archive.ubuntu.com trusty-security/restricted Sources [4,035 B] Get:13 http://archive.ubuntu.com trusty-security/universe Sources [33.0 kB] Get:14 http://archive.ubuntu.com trusty-security/multiverse Sources [2,350 B] Get:15 http://archive.ubuntu.com trusty-security/main i386 Packages [389 kB] Get:16 http://archive.ubuntu.com trusty-security/restricted i386 Packages [12.7 kB] Get:17 http://archive.ubuntu.com trusty-security/universe i386 Packages [123 kB] Get:18 http://archive.ubuntu.com trusty-security/multiverse i386 Packages [4,976 B] Hit http://archive.ubuntu.com trusty-security/main Translation-en Hit http://archive.ubuntu.com trusty-security/multiverse Translation-en Hit http://archive.ubuntu.com trusty-security/restricted Translation-en Hit http://archive.ubuntu.com trusty-security/universe Translation-en Hit http://archive.ubuntu.com trusty Release Hit http://archive.ubuntu.com trusty/main Sources Hit http://archive.ubuntu.com trusty/restricted Sources Hit http://archive.ubuntu.com trusty/universe Sources Hit http://archive.ubuntu.com trusty/multiverse Sources Hit http://archive.ubuntu.com trusty/main i386 Packages Hit http://archive.ubuntu.com trusty/restricted i386 Packages Hit http://archive.ubuntu.com trusty/universe i386 Packages Hit http://archive.ubuntu.com trusty/multiverse i386 Packages Hit http://archive.ubuntu.com trusty/main Translation-en_AU Hit http://archive.ubuntu.com trusty/main Translation-en Hit http://archive.ubuntu.com trusty/multiverse Translation-en_AU Hit http://archive.ubuntu.com trusty/multiverse Translation-en Hit http://archive.ubuntu.com trusty/restricted Translation-en_AU Hit http://archive.ubuntu.com trusty/restricted Translation-en Hit http://archive.ubuntu.com trusty/universe Translation-en_AU Hit http://archive.ubuntu.com trusty/universe Translation-en Fetched 2,245 kB in 34s (65.3 kB/s) Reading package lists... Done cabtoo@cabtoo6:~$ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: login openssh-client passwd ssh-askpass-gnome unity-lens-music unity-scope-musicstores 6 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade. 1 not fully installed or removed. Need to get 1,726 kB of archives. After this operation, 24.6 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main login i386 1:4.1.5.1-1ubuntu9.2 [300 kB] Get:2 http://archive.ubuntu.com/ubuntu/ trusty-updates/main passwd i386 1:4.1.5.1-1ubuntu9.2 [746 kB] Get:3 http://archive.ubuntu.com/ubuntu/ trusty-updates/main openssh-client i386 1:6.6p1-2ubuntu2.6 [574 kB] Get:4 http://archive.ubuntu.com/ubuntu/ trusty-updates/main ssh-askpass-gnome i386 1:6.6p1-2ubuntu2.6 [14.4 kB] Get:5 http://archive.ubuntu.com/ubuntu/ trusty-updates/main unity-lens-music i386 6.9.0+14.04.20151120.2-0ubuntu1 [50.8 kB] Get:6 http://archive.ubuntu.com/ubuntu/ trusty-updates/main unity-scope-musicstores i386 6.9.0+14.04.20151120.2-0ubuntu1 [40.5 kB] Fetched 1,726 kB in 12s (141 kB/s) (Reading database ... 1561908 files and directories currently installed.) Preparing to unpack .../login_1%3a4.1.5.1-1ubuntu9.2_i386.deb ... Unpacking login (1:4.1.5.1-1ubuntu9.2) over (1:4.1.5.1-1ubuntu9.1) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up login (1:4.1.5.1-1ubuntu9.2) ... (Reading database ... 1561908 files and directories currently installed.) Preparing to unpack .../passwd_1%3a4.1.5.1-1ubuntu9.2_i386.deb ... Unpacking passwd (1:4.1.5.1-1ubuntu9.2) over (1:4.1.5.1-1ubuntu9.1) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Processing triggers for ureadahead (0.100.0-16) ... ureadahead will be reprofiled on next reboot Setting up passwd (1:4.1.5.1-1ubuntu9.2) ... (Reading database ... 1561908 files and directories currently installed.) Preparing to unpack .../openssh-client_1%3a6.6p1-2ubuntu2.6_i386.deb ... Unpacking openssh-client (1:6.6p1-2ubuntu2.6) over (1:6.6p1-2ubuntu2.4) ... Preparing to unpack .../ssh-askpass-gnome_1%3a6.6p1-2ubuntu2.6_i386.deb ... Unpacking ssh-askpass-gnome (1:6.6p1-2ubuntu2.6) over (1:6.6p1-2ubuntu2.4) ... Preparing to unpack .../unity-lens-music_6.9.0+14.04.20151120.2-0ubuntu1_i386.deb ... Unpacking unity-lens-music (6.9.0+14.04.20151120.2-0ubuntu1) over (6.9.0+13.10.20131011-0ubuntu1) ... Preparing to unpack .../unity-scope-musicstores_6.9.0+14.04.20151120.2-0ubuntu1_i386.deb ... Unpacking unity-scope-musicstores (6.9.0+14.04.20151120.2-0ubuntu1) over (6.9.0+13.10.20131011-0ubuntu1) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up dolibarr (3.8.3-3) ... Run the dolibarr config script Ask for web server to setup Run the dolibarr postinst script First install Enable php module mysqli with php5enmod Enable apache module alias with a2enmod Module alias already enabled Enable link for Apache config file with a3enconf Conf dolibarr already enabled Enable lighttpd link for dolibarr config file Ignoring unknown module: dolibarr already enabled Run /etc/init.d/lighttpd force-reload to enable changes dpkg: error processing package dolibarr (--configure): subprocess installed post-installation script returned error exit status 2 Setting up openssh-client (1:6.6p1-2ubuntu2.6) ... Setting up ssh-askpass-gnome (1:6.6p1-2ubuntu2.6) ... Setting up unity-lens-music (6.9.0+14.04.20151120.2-0ubuntu1) ... Setting up unity-scope-musicstores (6.9.0+14.04.20151120.2-0ubuntu1) ... Errors were encountered while processing: dolibarr E: Sub-process /usr/bin/dpkg returned an error code (1) This seems to be the same bug for other ubuntu systems as well. What is the correct way to uninstall dolibarr from my system, because it has errors when I try to do that too? So what do I do now?