I'm not sure why you would ever need to do this, but just in case you do, here is a DIY on how to remove it.
To understand removal, it helps to see what the battery tray looks like out of the bike:
In the above photograph the battery tray has been disassembled fully, you likely won't need to...