Yup, there's always been graffiti.
For those who haven't been around all that long, though, you might be surprised to learn that it has become vastly more common within the last 30 years. By at least an order of magnitude. I was there, and I've seen the difference.
To prevent this, you either need a government that is consistently diligent and uncompromising towards vandals (troubling, as this implies a police-state mindset), or else you need to prevent younger people from elevating their own desire for expression and recognition, over respect for other people's (and public) property.
Because that's what grafitti represents, in the end: the elevation of Self over Others. "My right to make my marks wherever I want, trumps everyone else's rights."
i know how to prevent that at the individual level: teach your children not to be narcissistic, destructive little gits with no respect for others. But how to prevent it on a societal level, I dunno.