As much as you can control things like sugar intake, yes, it helps. Type two diabetes is about more than just sugar we eat. You need a healthy balanced diet on a regular basis cutting down on sugar and carbs and to exercise regularly. You may be predisposed to diabetes because of your family history but things like weight management, regular exercise and eating well will minimize that.
I agree with specialmom.
Cutting sugar, carbs, and processed foods will definitely help your body to delay onset of diabetes. For some people with type 2, this may help long term.
Other key points are physical activity (regular), ensuring that your weight is strictly normal, stress management.
If you are at risk due to family history, annual checking of hba1c and occasional checking of fasting and after eating blood sugars is probably a good idea. The idea would be to catch diabetes early (if you are developing it) so that it can be managed early.