Question: I am sure, I've uninstalled iTunes but don't know how logo is displaying in applications.

[![itunes in my Applications ](https://i.stack.imgur.com/tFk01.png)](https://i.stack.imgur.com/tFk01.png)

I tried to view all the list file using `sudo apt list` but nothing regarding iTunes and also searched in packages to find iTunes and manually remove but it's not helpful, I want to remove it but unable to find a solution.

Answer: 
You don't really need to use `expect` and can give commands to `bluetoothctl` directly as arguments.

```bsh
# ...
bluetoothctl -- power on
bluetoothctl -- connect $mac
# ...

```

For a more complete example, here is the full Bash script that I use in Ubuntu 20.04 for my BT radio :

```bsh
#!/bin/bash

mac="90:03:B7:17:00:08" # DEH-4400BT

if [ "$1" = "off" ]; then
    bluetoothctl -- disconnect
    exit $?
fi

# turn on bluetooth in case it's off
rfkill unblock bluetooth

bluetoothctl -- power on
bluetoothctl -- connect $mac

# Use it as default output for PulseAudio

sink=$(pactl list short sinks | grep bluez | awk '{print $2}')

if [ -n "$sink" ]; then
    pacmd set-default-sink "$sink" && echo "OK default sink : $sink"
else
    echo could not find bluetooth sink
    exit 1
fi

```

This assumes the destination `$mac` is already paired of course.
Capture the output and strip the prompts...

```
typeset -a OUTPUT

clean_line () {
   local LINE

   while read LINE;do
      echo ${LINE} | perl -pe 's/\x1b\[[0-9;]*[mG]//g; s/\[.*\]#?//g; s/\x0d\x1b\x20\x0d\x1b\x5b\x4b//g; s/^ //g'
   done
}

coproc bluetoothctl
echo -e 'agent on\nconnect 00:0C:8A:FE:ED:18\nexit' >&p 
OUTPUT=("${(f)$(cat <&p | clean_line)}")

NDX=0
for L in ${OUTPUT};do
   ((NDX++))
   printf "%d) %s\n" ${NDX} ${L}
done

```