It is best to remove the food from the shelves you are cleaning to ensure thorough cleaning and prevent any contamination. However, you can leave the food in other parts of the refrigerator while cleaning.