Is it possible to cancel or clear a notification created by using notify-send?
The process you are looking for is notify-osd
. You can kill it by either the command:
pkill notify-osd
or by its pid:
kill $(ps -e | grep notify-osd | awk '{ print $1 }')
or, even better, as suggested by @kos (thanks!), using pgrep
:
kill $(pgrep ^notify-osd$)
Alternatively, if you do not want the notification to show up in the notification history at all, you can try:
notify-send --hint int:transient:1 "Title" "Body"