To debar is to officially bar, ban, or exclude someone from doing something. Debar can also mean to prevent something from happening. If you have a hat club, you can debar anyone who’s not wearing one.
If someone is barred from entering, they are prevented from entering. Oddly enough, to debar them means the same thing. If you're debarred from a school, you can no longer attend. If a politician is debarred from office, they've been thrown out. You can also debar events. Eating well and exercising can debar many health problems. This kind of debarring means the same as averting. People try to debar negative things from happening.