Raspberries don't need pruning the first year, but afterwards will need to be pruned once a year after harvest.
Immediately after harvest, cut all canes that have produced fruit to ground level. This helps to prevent disease and gives the plant more room to grow. What remains is first-year canes that will produce fruit next year. Thin each plant to three or four straight, sturdy canes. Cut the remaining canes back to a height of 4-5 feet.
Pruning fall-bearing raspberries is easy because you don't have to decide which canes to save. Simply mow off these brambles as close to ground level as possible after the leaves drop in the fall. Remove all stubs. Any buds that grow from stubs that weren't cut low enough will grow into unproductive branches.
Black and Purple Raspberries
Most of the fruit on these raspberries is borne on the sideshoots. To encourage the plant to put its energy into growing productive side-shoots, cut the tip off each cane in the summer. This should be done when the plant reaches a height of 2 1/2-4 feet. After harvest, cut out the canes that have produced fruit and choose 6-9 large, straight canes on each plant to save for next year. Prune back the side branches on these canes to 8-12 inches and remove spindly ones.
Blackberries are usually left to grow along the ground the first year. Fruit is borne on second-year canes. Prune spent canes off immediately after harvest. In very early spring, thin to the best 6-9 canes per hill, and cut these canes to a length of about 7 feet. Shorten the side-branches to 10-15 inches and remove the spindly ones. Tie these canes along the trellis.