Removing the pcspkr module is fine for an instant halt to all beeping noises coming out of the machine, and sure you could just add this to your profile in .bashrc or .bash_profile
admica@rootninja ~$ sudo modprobe -r pcspkr
or
admica@rootninja ~$ sudo rmmod pcspkr
But the right/best/most complete way is to do it system-wide where it doesn’t even get enabled in the first place by blacklisting it in the modprobe configuration.
admica@rootninja ~$ sudo echo blacklist pcspkr >> /etc/modprobe.d/blacklist