Note: Every cactus specie is different in its requirements for growing. This guide is just a general reference.
When to repot cacti: With most low growing, especially globular, types of cacti it is often best to wait until they (the tops/crowns) reach the edges of the pot. Once they begin to get root bound, it is time to repot. With taller growing columnars, try to see when the roots are crowding the pots. The pot should feel hard (plastic) and not bend before repotting. Roots coming out the bottom does not always mean they are root bound, but one may wish to repot at that time as well.
It is always best to repot any cactus in the dry season. When repotting cacti, roots break and need to heal. If its wet out, and these damaged roots stay wet, infections and rot may take place. In general, only repot when its dry and warm.
Big or small pots?: In many cases it is safer to under pot than over pot, especially for slower growing, rot prone species (Astrophytum, Ariocarpus, Lophophora, Aztekium, Obregonia to name a few). The reason behind this is the more substrate that's in the pot the more water is going to be stored. Larger pots also take longer to dry out which can lead to potential problems with rot. Taller, hardier types of cactus (Cereus, Trichocereus, Hylocereus, Stenocereus, Myrtillocactus, Opuntia to name a few) are usually ok in larger pots as they are not so water sensitive. Your substrate mix and local climate will play a very important role in this as well.
Taking the old pot off: Really root bound plants may take some effort to get out. We try to squeeze the sides of the pots (plastic) and loosen it up and get rid of any loose substrate from the top. Keep tapping and squeezing and carefully digging out any loose substrate that you can.. cutting/breaking pots are better than breaking the plants when it gets down to it.
Cleaning the roots: Once the plant is out, its a good idea to clean the roots of the old substrate. Nothing crazy, just get rid of the majority of loose stuff.
To prune or not to prune: This is a bit of a debatable area among growers. Basic root biology says that the larger tap roots take in none to almost no water/nutrients. Large thick roots act more as a transport system and storage than an intake system for water and nutrition. So they are not what are really growing the plant fast. Fine root hairs located on the capillary roots are what do the "sucking" down below. The idea with pruning the roots is to cut the tap root a bit (amount ranges from 1/5 to 1/2 usually) and many of the larger roots (for large columnars just hack at the roots a bit). Cutting these larger roots stop their growth and promote more fine capillary roots to grow instead, allowing more water/nutrients to be taken in.
Some people claim this is bad cause it risks the plant, which in a way it does but if done properly should not harm the plant in any way.
How to prune the roots: With smaller tap root type plants (Ariocarpus, Lophophora, Turbinicarpus, Obregonia etc) we recommend about 1/4 cut. Once the roots are completely cleaned of free sand/grit etc (clean the roots first) take a clean sharp blade and cut the tap off. make a clean cut. Cutting the messy smaller roots is often done as well. The key to doing this successfully is to *LET THE ROOTS ****DRY BEFORE**** POTTING THEM AGAIN. You just cut their main pipe to the upper plant, so it needs to heal, just like a cutting needs to callous before planting. We always let ours dry and heal on an open table in shaded sun for 1-3 weeks. The plant may dehydrate, but that's fine....they are cactus....
Above is an image showing the cleaned roots of Obregonia denegrii before and after trimming them. This example does not trim very much, some may trim half of what's left in the bottom example.
Let it dry: It is best, once the roots are cleaned (and if pruned), to allow the roots to dry out a bit before repotting. Again this is more important for slower growers and species with taproots. Leaving the bare root plant on a table for a minimum of 4 days is a good idea. When plants are taken out of pots roots are always damaged, even if you don't think so. When repotted right away, they may not heal and could get infected before they have a chance to heal (especially in wet substrates). Letting them dry before potting is just a safe way to do it and really should be done every time.
Placing it in the pot: If the plant you are repotting is especially nasty with large sharp spines, try folding up a stack of newspaper and wrap that around the cactus. Heavy leather gloves sometimes work as well, if the cactus isn't TOO nasty! When potting, care should be taken not to damage the roots. Holding it in the middle of the pot (above the bottom) and adding your substrate around all edges to center it in the pot is the way to go. when the pot is 1/2 full, tap the sides to try and let the mix get into the root mass (if there is one). Once filled, tap again for same reason.
When potting, it is important (more so for water sensitive species) not too plant it too deep into the pot and not to plant it too high. You don't want the root base to be sticking up above the substrate line, nor do you want half the plant under the substrate. Try and follow where it was before, often there is a clear green and brown border you can see.
After care and watering: Once all potted up you may place it back wherever it was before hand. Watering can be tricky, depending on specie. If it is a fairly hardy water tough plant (like Hylocereus, Cereus, Trichocereus etc) then watering after a few days to a week is ok. For more sensitive species that are prone to rot from over watering, it is safe to wait another 2-3 weeks before watering at all. "Better safe than sorry." and we have the pictures to prove it...
Unlike many other plants that are watered directly after planting, cacti should not. They need time to settle, in dry situations. Once healed, and adjusted, they may be watered. The number 1 killer of cactus is too much water!