The Grateful Dead marked a milestone at the beginning of July, celebrating the band’s 50th anniversary with a few final concerts by the surviving members of the group. In that half-decade, if you saw them in concert, you’d know their music was like a trip to a botanic garden: often wandering down paths and full of unexpected turns filled with psychedelic beauty.

With the band’s farewell, Deadheads will fade into iconographic history. But gardeners can keep alive the legend with a simple but necessary practice. Deadheading, as it applies to gardening, is the removal of flowers from plants when the flowers are fading or dead. If you’ve never done it, here are a few tips to keep it from being a long, strange trip through the garden:

The purpose of a flower is reproduction: attracting pollinators by flaunting yourself, either with alluring scent or bodacious color. It isn’t an empty promise; usually, this is a win-win situation for pollinators, who collect pollen, nectar or fiber from the proffered bloom. Once a flower has been pollinated, the plant produces fruit and seeds.

Deadheading redirects the plant’s energy from fruit swelling, ripening and seed production into extended flowering. It also cleans up the appearance of the plant, which isn’t exactly how people described Deadheads who descended on their towns for the concerts.

You can use a variety of methods to deadhead: snapping or pinching off flowers by hand, shearing or clipping with pruners. In all cases, it’s important to get a clean cut to prevent leaving an open ragged wound for diseases or pests to enter the plant.

Tuck some Scarlet Begonias into your curls, put on some headphones and plug in some Dead — you can play “Sugar Magnolia” while deadheading, although most people leave the flowers on that tree because the seed pods are pretty groovy. Begonias benefit from it, though, so the girl in that song did the plant a favor by plucking the flowers to tuck in her hair.

Roses are a plant that responds well to deadheading. The American Rose Society recommends deadheading roses just before they drop their petals, cutting the canes at a 45 degree angle just above a five-leaf set.

Plants such as lilacs and peonies won’t bloom again this season, but deadheading immediately after blooming cleans them up and keeps the plant healthy. Marigolds, verbena, nicotiana, petunias and pansies also benefit from deadheading.

Bulbs should have flowers — but not leaves — deadheaded to keep them from expending energy on producing seed instead of storing it in the bulb for blooming next year. Cut back tulips, hyacinths and daffodils before they begin to drop their petals or look faded and cut individual blooms off the flower stems of flag iris and lilies as they wither, removing the entire flower stalk only after the last bloom is finished.

Get to know which plants have decorative seed heads after the flower is spent — echinacea, alliums and native grasses. The stalks and seed heads provide winter interest, as well as important nooks for beneficial spiders to live within. Leave flowers on fruiting shrubs so the berries can provide winter interest and attract birds.

If you want some flowers to reseed, leave the flowers on the plant. Poppies, foxglove, columbine, flax and lupine reseed. Others can be thugs, such as some salvia, obedient plant or cosmos. To limit their spread, deadhead these plants.

Compost the flowers unless they’re diseased, then finish the task with a rousing rendition of the Dead’s “Let It Grow.”