Ecological traps are habitat sinks that are preferred by dispersing animals but have higher mortality or reduced fecundity compared to source habitats. Theory suggests that if mortality rates are sufficiently high, then ecological traps can result in extinction. An ecological trap may be created when pest animals are controlled in one area, but not in another area of equal habitat quality, and when there is density-dependent immigration from the high-density uncontrolled area to the low-density controlled area. We used a logistic population model to explore how varying the proportion of habitat controlled, control mortality rate, and strength of density-dependent immigration for feral pigs could affect the long-term population abundance and time to extinction. Increasing control mortality, the proportion of habitat controlled and the strength of density-dependent immigration decreased abundance both within and outside the area controlled. At higher levels of these parameters, extinction was achieved for feral pigs. We extended the analysis with a more complex stochastic, interactive model of feral pig dynamics in the Australian rangelands to examine how the same variables as the logistic model affected long-term abundance in the controlled and uncontrolled area and time to extinction. Compared to the logistic model of feral pig dynamics, the stochastic interactive model predicted lower abundances and extinction at lower control mortalities and proportions of habitat controlled. To improve the realism of the stochastic interactive model, we substituted fixed mortality rates with a density-dependent control mortality function, empirically derived from helicopter shooting exercises in Australia. Compared to the stochastic interactive model with fixed mortality rates, the model with the density-dependent control mortality function did not predict as substantial decline in abundance in controlled or uncontrolled areas or extinction for any combination of variables. These models demonstrate that pest eradication is theoretically possible without the pest being controlled throughout its range because of density-dependent immigration into the area controlled. The stronger the density-dependent immigration, the better the overall control in controlled and uncontrolled habitat combined. However, the stronger the density-dependent immigration, the poorer the control in the area controlled. For feral pigs, incorporating environmental stochasticity improves the prospects for eradication, but adding a realistic density-dependent control function eliminates these prospects.