Jeremiah 5:10

Go ye up upon her walls, and destroy; but make not a full end: take away her battlements; for they are not the LORD’s.

The word for battlements means a parapet along the top of a wall to protect those fighting on the fortification, which the Revised Version renders as branches.
The verse commands attackers to go up upon Jerusalem's walls, breach its defenses, and destroy what is not the Lord's, identifying its battlements as not belonging to the Lord.
It is part of a warning that Jerusalem would be attacked and destroyed because the people refused God's warnings and would not turn from disobedience, a judgment that could have been averted by repentance and obedience.

Serving and worshiping foreign and strange gods in their own land led to Israel being scattered and exiled in a foreign and strange land.
The destruction commanded is limited rather than total, and is not to bring the people to a complete end or to mean the complete end of God's people.
The captivity was the result of the people's sinful course and showed that their security did not rest in the holy city, temple, or land.