To unload the kernel module, we use the convenience utility rmmod(8) (remove module):
$ rmmod
rmmod: ERROR: missing module name.
$ rmmod helloworld_lkm
rmmod: ERROR: could not remove 'helloworld_lkm': Operation not permitted
rmmod: ERROR: could not remove module helloworld_lkm: Operation not permitted
$ sudo rmmod helloworld_lkm
[sudo] password for llkd:
$ dmesg |tail -n2
[ 2912.881098] Hello, world
[ 5551.863410] Goodbye, world
$
The parameter to rmmod(8) is the name of the kernel module (as shown in the first column of lsmod(8)), not the pathname. Clearly, just as with insmod(8), we need to run the rmmod(8) utility as the root user for it to succeed.
Here, we can also see that, because of our rmmod, the exit routine (or "destructor") helloworld_lkm_exit() function of the kernel module got invoked. It in turn invoked printk, which emitted the Goodbye, world message...