To remove hid_generic on demand:
sudo modprobe -r hid_generic
(or sudo rmmod hid_generic, under the hood it's the same tool).
To insert the module into the kernel again:
sudo modprobe hid_generic
Note the module may be re-loaded automatically when you connect a suitable device. To prevent this from happening, put
blacklist hid_generic
into /etc/modprobe.d/blacklist.conf. You will still be able to insert the module manually.