Liver cancer cannot be prevented completely. It is sometimes caused due to a disease which is passed on genetically like Hepatitis B and C, hemochromatosis. In other cases, liver cancer can be prevented by taking precautionary measures such as-
Limited alcoholic consumption
Using condoms during sex to avoid exposure to hepatitis C germs
Using sterilized needles while getting a tattoo or piercing done
Getting vaccinated for hepatitis B.
Maintaining a healthy weight
Maintaining healthy sugar levels in case of diabetes