It is not possible to capture or kill "cartels" out of existence because they are not actually constituted by individuals. Despite their depiction in popular culture, the drug trade does not rely on hierarchical groups like a conventional military. "Cartels" have no true center of gravity that can be targeted easily because they are dynamic networks of political power and covert influence that are ultimately created and sustained by the demand for illicit commodities.
Demand for drugs seems to be an irreformable part of human nature. Despite criminalization, a steady percentage of the population uses drugs, both legal and illicit. As long as the demand for drugs or other illegal commodities exists, there will always be a financial incentive that will make the risks inherent to the business of supplying that demand acceptable to some.
Not that organized crime is exclusive to the drug trade. Any prohibited commodity is a source of revenue which can be used for whatever money can buy (like political influence) and a lifeblood for nonstate armed groups. Insurgencies, terrorist groups and intelligence services throughout the world all have an interest in influencing those activities.
Operating outside of the law is not a problem for nonstate actors, but state entities are restricted (to some degree) by the law. To get around this, state agents infiltrate nonstate entities through informants or by working covertly in order to control these activities and revenue sources. That's the goal at least.
The bottom line is that if you don't influence it, someone else will.
As long as drugs are prohibited, at best, you can try to control the trade through enforcement actions and covert influence while confounding adversaries attempting the same.
Alternatively, the drug trade could be regulated through a legal framework. Unthinkable until recently, that seems to be changing somewhat but at a glacial pace. Regulating drugs is by no means a perfect solution. A certain percentage of drug users will become addicted to those drugs. That's just the nature of substances that positively reinforce the act of consuming them. Allowing private corporations motivated by profit to sell addictive products associated with very real health and social impacts should be carefully considered.
However, there are even more perverse incentives for leaving the drug trade within the realm of the underworld. The fact is, there are strategic objectives that can be accomplished through irregular forces like criminal cartels and terrorist groups or wars (nominally) against them.
Criminalizing drugs can also be expedient for domestic political goals. In an interview with one of the architects of the War on Drugs, former Nixon adviser John Ehrlichman explained how drugs were criminalized to suppress dissent against the establishment. According to Ehrlichman:
The Nixon campaign in 1968, and the Nixon White House after that, had two enemies: the antiwar left and black people. You understand what I'm saying? We knew we couldn't make it illegal to be either against the war or black, but by getting the public to associate the hippies with marijuana and blacks with heroin, and then criminalizing both heavily, we could disrupt those communities. We could arrest their leaders, raid their homes, break up their meetings, and vilify them night after night on the evening news. Did we know we were lying about the drugs? Of course we did.
An unfortunate truth is that in a multipolar world with profitable prohibited commodities, there will always be the phenomenon of "cartels" trafficking them. So long as there are illicit trades, there will be political powers competing to exploit them for their own ends. Unless and until drugs are regulated, that's just how it is.