Humans and many other animals are able to breathe because plants produce more oxygen than they need. I was thinking if all animals died all of a sudden, then wouldn't plants die too. Eventually they would produce too much oxygen and wouldn't have enough carbon dioxide to go through photosynthesis.
Now, if all animals were to suddenly die, there would sure cause a drastic environmental change for plants. Whether or not that would lead all plants to extinction is untestable and it is therefore impossible to give a definite answer. This type of question would be better suited for worldbuilding.SE. I personally doubt all plants would disappear.