How to disable and/or remap buttons on your mouse
Use the program xev through grep to show only ButtonPress events.
xev | grep -A2 ButtonPress
Create a file called .Xmodmap
micro ~/.Xmodmap
Inside the file disable and/or remap buttons you detected with xev
! Remap button 1 to 8 and disable button 8 and 9.
pointer = 8 2 3 4 5 6 7 0 0
Check it.
xmodmap ~/.Xmodmap