Medications can help dissolve gallstones in people who cannot have surgery. But this may take months or years. The stones may form again when the medication is stopped.