The fruit of my apricot tree comes on and looks fine. When you open the fruit up, however, it is rotten on the inside. It has a soft frothy center, some with little white worms and also little long black bugs. Is there anything I can do to achieve disease free fruit? The fruit looks wonderful from the outside.
There are a number of insect pests that can attack apricots. This article has information on some of the most common, and methods of control. https://www.gardeningknowhow.com/edible/fruits/apricots/apricot-tree-pests.htm
Unfortunately, I think it's possible your problem is from some kind of fruit fly or moth. As some of these (such as the medfly) are considered extremely invasive, you should take samples to the Extension Service. If it's medfly, they're going to want to know. They will be able to tell you exactly what to do about these invaders. This link will help you find the nearest office: https://www.gardeningknowhow.com/extension-search/