How to unpair bluetooth device from the command line

Solution 1:

first of all start your Bluetooth from System settings.

Open terminal and type:

bluetoothctl

then you should see the list of devices you have paired with and their corresponding MAC address. If you do not, type:

paired-devices

To un-pair a device type:

remove aa:bb:cc:dd:ee:ff

replace aa:bb:cc:dd:ee:ff with the MAC address of the device to un-pair.

there is no un-pair commmand

Solution 2:

In case somebody looks for an up to date answer. The interface of bluetoothctl has changed a bit. The following answer is valid for Ubuntuu 20.04 LTS:

To unpair, now do the following: Open the bluetooth command line by entering

bluetoothctl

in the command line. After this you get a list of all paired bluetooth devices by entering paired-devices

[bluetooth]# paired-devices
Device F4:4E:FD:48:08:FF SoundCore mini
Device 30:C0:1B:79:6B:FF JBL GO 2
Device 7C:96:D2:88:2A:FF Soundcore Motion+

Now you can remove pairing of the desired devices with remove mac:id and control the result with executing `paired-

[bluetooth]# remove 7C:96:D2:88:2A:FF
[DEL] Device 7C:96:D2:88:2A:FF Soundcore Motion+
Device has been removed
[bluetooth]# paired-devices
Device F4:4E:FD:48:08:FF SoundCore mini
Device 30:C0:1B:79:6B:FF JBL GO 2

now you can leave the bluetooth command line by entering exit