How to remove right click "format" option from a disk icon in the launcher as it can lead to formatting by mistake.
As far as I know...the Format option is hardcoded in the Unity source.
NOTE: I recommend you to do this in a Virtual Machine or in a Test Machine to see is everything is OK. (In this example I'm running Ubuntu 12.04 with Unity 5.20.0).
1) Make sure you have enable the Source code repository
Open a Terminal window Ctrl+Alt+T and type:
2) In the Terminal type the following to install the necessary packages.
3) Install build dependencies.
4) Create a folder to download the source code.
5) Download the source code & Export variables.
6) Create the patch and Edit the source code.
Remove the lines... from 171 to 185.
Save the changes.
7) Build the deb packages.
8) Install the deb packages.
9) Finally you can logout and Login to see the changes.
Hope this helps.