I get this win I try to remove or install bluetooth using these commands:
sudo apt-get purge blueman bluez-utils bluez bluetooth && sudo apt-get autoremove && sudo apt-get autoclean
sudo apt -y install bluetooth
I get this message:
Removing bluetooth (5.64-0ubuntu1) ...
Removing bluez (5.64-0ubuntu1) ...
Failed to stop bluetooth.service: Unit bluetooth.service not loaded. invoke-rc.d: initscript bluetooth, action "stop" failed.
dpkg: error processing package bluez (--remove):
installed bluez package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Failed to start bluetooth.service: Unit bluetooth.service failed to load properly, please adjust/correct and reload service manager: File exists
See system logs and 'systemctl status bluetooth.service' for details.
invoke-rc.d: initscript bluetooth, action "start" failed.
bluetooth.service - Bluetooth service
Loaded: error (Reason: Unit bluetooth.service failed to load properly, please adjust/correct and reload service manager: File exists)
Active: inactive (dead)
Docs: man:bluetoothd(8)
Aug 15 09:41:06 Ahmed-TP500LA systemd[1]: bluetooth.service: Two services allocated for the same bus name org.bluez, refusing operation.
Aug 15 09:44:29 Ahmed-TP500LA systemd[1]: bluetooth.service: Two services allocated for the same bus name org.bluez, refusing operation.
Aug 15 09:45:17 Ahmed-TP500LA systemd[1]: bluetooth.service: Two services allocated for the same bus name org.bluez, refusing operation.
Aug 15 09:45:21 Ahmed-TP500LA systemd[1]: bluetooth.service: Two services allocated for the same bus name org.bluez, refusing operation.
Aug 15 09:45:23 Ahmed-TP500LA systemd[1]: bluetooth.service: Two services allocated for the same bus name org.bluez, refusing operation.
Aug 15 09:49:32 Ahmed-TP500LA systemd[1]: bluetooth,service: Two services allocated for the same bus name org,bluez, refusing operation.
Aug 15 09:49:32 Ahmed-TP500LA systemd[1]: bluetooth.service: Two services allocated for the same bus mame org.bluez, refusing operation.
Aug 15 09:49:33 Ahmed-TP500LA systemd[1]: bluetooth.service: Two services allocated for the same bus name org.bluez, refusing operation.
Aug 15 09:49:33 Ahmed-TP500LA systemd[1]: bluetooth.service: Two services allocated for the same bus name org.bluez, refusing operation.
Aug 15 09:49:33 Ahmed-TP500LA systemd[1]: bluetooth.service: Two services allocated for the same bus name org.bluez, refusing operation.
dpkg: error while cleaning up:
installed bluez package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
bluez
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
ahmed@Ahmed-TP500LA: $
operation.
manager: File exists