2
Preconfiguring packages ...
(Reading database ... 238478 files and directories currently installed.)
Removing systemd-shim (9-1bzr4ubuntu1) ...
Removing 'diversion of /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service to /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd by systemd-shim'
dpkg-divert: error: rename involves overwriting '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service' with
  different file '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd', not allowed
dpkg: error processing package systemd-shim (--remove):
 subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
 systemd-shim
E: Sub-process /usr/bin/dpkg returned an error code (1)

marked as duplicate by karel, Fabby, Zanna, George Udosen, user535733 Aug 29 '18 at 16:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4

Rename /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service to  /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.bak and do

 sudo apt upgrade 

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