Ex 8:20 And the LORD said to Moses, "Rise early in the morning and stand before Pharaoh as he comes out to the water. Then say to him, 'Thus says the LORD: "Let My people go, that they may serve Me.
21 "Or else, if you will not let My people go, behold, I will send swarms of flies on you and your servants, on your people and into your houses. The houses of the Egyptians shall be full of swarms of flies, and also the ground on which they stand.
22 "And in that day I will set apart the land of Goshen, in which My people dwell, that no swarms of flies shall be there, in order that you may know that I am the LORD in the midst of the land.
23 "I will make a difference between My people and your people. Tomorrow this sign shall be."'"
24 And the LORD did so. Thick swarms of flies came into the house of Pharaoh, into his servants' houses, and into all the land of Egypt. The land was corrupted because of the swarms of flies.
25 Then Pharaoh called for Moses and Aaron, and said, "Go, sacrifice to your God in the land."
26 And Moses said, "It is not right to do so, for we would be sacrificing the abomination of the Egyptians to the LORD our God. If we sacrifice the abomination of the Egyptians before their eyes, then will they not stone us?
27 "We will go three days' journey into the wilderness and sacrifice to the LORD our God as He will command us."
28 And Pharaoh said, "I will let you go, that you may sacrifice to the LORD your God in the wilderness; only you shall not go very far away. Intercede for me."
29 Then Moses said, "Indeed I am going out from you, and I will entreat the LORD, that the swarms of flies may depart tomorrow from Pharaoh, from his servants, and from his people. But let Pharaoh not deal deceitfully anymore in not letting the people go to sacrifice to the LORD."
30 So Moses went out from Pharaoh and entreated the LORD.
31 And the LORD did according to the word of Moses; He removed the swarms of flies from Pharaoh, from his servants, and from his people. Not one remained.
32 But Pharaoh hardened his heart at this time also; neither would he let the people go.
The pagan gods connected with flies was discredited here like Re, Uatchit and Belzebub.
The Egyptians believed that each god held power only within a specific region. To prevent Pharaoh from thinking that it must have been one of the Egyptian gods who was doing it all, a distinction between the Egyptians and the Israelites was made. The flies would only infest the Egyptians but not the Israelites, making it very obvious that it was the God of Israel who was doing it.
The Egyptians viewed the animals that the Israelites would be sacrificing as sacred. They were manifestations of their respective gods. To sacrifice them in front of the Egyptians would have caused a violent uproar. Moses did not want to be unnecessarily offensive.
The removal of the flies were so effective that "not a fly remained" displaying the power and sovereignty of the God of the Israelites. He is not only in control of the swarm of flies but also of every single fly.