My elm has many leaves full of holes and after inspecting it I saw a lay of pulpas and prepulpae around the base of the fence next to the tree. How can I get rid of it, can I just kill all the pulpae? Maybe just get a bag and put them there and seal it?
Destroying the pupae like you suggest will prevent them from maturing into adults. Typically adults overwinter in sheltered areas, sometimes entering houses through foundation cracks. In the spring they emerge, to feed on the tree leaves, mate, and lay eggs that then hatch into larvae that also feed on the leaves. Within 3-4 weeks the larvae are fully grown and ready to pupate. Although most larvae will then crawl down the tree trunk, some may crawl into cracks in the bark so you should check for pupae along the tree trunk as well. Adults emerge from the pupae in 2 weeks to restart the cycle. Depending on the time of year (there can be 2 cycles in our climate) they will either feed and mate or find a sheltered spot to overwinter.
If your tree is healthy and was not affected the previous year, the damage may not affect it , especially if it is defoliated near the end of the growing season. You can spray the tree with organic insecticides such as insecticidal soap or BTSD (Bacillus thuringiensis var. san diego) but this is difficult to do on a large tree and would require a professional to apply the insecticide and this will not prevent the insects from moving to other elms in the neighbourhood. Also keep in mind while BTSD is selective and nontoxic to people it will affect other larvae such as butterfly caterpillars.
A good source for organic plant solutions is:
The Organic Gardener’s Handbook of Natural Pest and Disease Control. F.M. Bradley, B.W. Ellis, D.L. Marshall; Rodale, 2010.
Your best solution is to destroy the pupae, prevent the adults from entering sheltered areas to overwinter, keep your tree healthy, free from stress caused by drought, injury or lack of nutrition and closely monitor for insects next year. For a detailed description of this pest and its life cycle check this site: https://www.missouribotanicalgarden.org/gardens-gardening/your-garden/help-for-the-home-gardener/advice-tips-resources/pests-and-problems/insects/beetles/elm-leaf-beetle.aspx