The Northern Devon Healthcare NHS Trust board voted unanimously to close beds in Bideford and Ilfracombe in plans to cut beds in the area from 74 to 40.
Campaigners supporting keeping the beds open have criticised the move.
Beds at Holsworthy and South Molton are to stay open. The trust said it wanted to use more home-based care, which it said was "as good as, if not better than" community hospital treatment.
The board made the decision following a six-week public consultation.
Board chairman Roger French said the "best decision" was to leave beds in Holsworthy and South Molton because they "served large, rural and dispersed populations. They also have the most modern buildings and do not struggle to fill staff vacancies."
GPs had sent a letter criticising the proposals, saying the planned closures had caused "grave concern over patient safety".
Campaigner Trisha Martin, who was at the meeting, said: "I think it's a very, very sad day for the whole of the community in north Devon.
"We depend on having places to go to recuperate after crises and having to be in acute care, and now those places are being removed."
Trust chief executive Dr Alison Diamond said: "Providing more care to people in their own homes is a model which is tried and tested and has proved to be safe and successful across Devon."
Community hospital beds in north Devon are to close, health bosses have said.