If you get rid of your moles, can you still get melanoma where they were?

Yes. Melanomas can occur in the retina, tounge, anus, under the nail. So yes even if the moles are all taken off one could still develop melanoma. In addition, these rumors can be so aggressive that the cells can spread before there is a substantial primary.
Removing moles. A mole, is a skin growth that contains mole cells, nevus cells. There are several kinds of moles, and some melanoma skin cancers can develop from a mole. Other melanomas develop from melanocyte cells in normal skin, where no mole is present. If your mole is removed for purely cosmetic reasons, it may be shaved off by your doctor, and may leave some mole cells behind, which could, form a cancer.

Related Questions

If you get rid of your moles, can you still get melanoma?

If you have more. You would not have melanoma from the moles that were removed as long as they are fully resected and non cancerous. You could develop more moles over period of time on different areas of your skin and those "old" moles that have been there could also change and could develop into melanoma. So, regular follow up with dermatologist would be needed for one who has a lot of moles & history of melanoma.
Moles. Removal of moles doesn't protect against all melanoma as many can arise from apparently normal skin.