Prepare for pruning pencil cacti by dressing in protective clothing and gear. Wear gloves, goggles and a long-sleeved shirt or jacket before working with pencil cacti to protect your skin and eyes from the corrosive sap. Spread a drop cloth around the plant if it is indoors to protect surrounding carpet or furniture.
Hard prune pencil cacti to control its size when the plant is dormant in late winter. Cut back to the desired size using a pair of bypass shears. Take into account the shape you want the plant to be as it grows out and stagger the stems according to that shape. For instance, to acquire a dome-topped plant, prune the edges of the plant shorter than the center.
Remove any damaged, withered or diseased branches from the pencil cacti as they appear year-round. Snip the stem where it attaches to the main branch. Remove the entire branch if the discoloration present on the stem has spread further onto the attached branch.
Spritz the cut stems with water from a spray bottle to help staunch the flow of the sap. Thoroughly saturate the cut areas three or four times in the hours following pruning.
Use the pruned stems to propagate new pencil cactus plants or put them in a bag and discard them in the trash. Do not compost pencil cacti stems or dispose of them in a green waste bin since the sap takes a long time to degrade and will burn you even after several months.
Water the pencil cactus as normal after pruning it. Follow with a balanced 14-14-14 ratio fertilizer one to two weeks after pruning it in late winter.