If the soil is not dry, the problem could be a condition called etiolation, where the rounded or stem-shaped parts of the cactus become narrower. This tells you that the cactus needs more sunlight, so move the pot to a southern- or western-facing window.

A standard mixture of soil for cacti of desert origin consists of two parts garden soil, two parts coarse sand, and one part peat. [2] X Research source

Wait to see how the cactus responds to its new shadier location. If the yellowed segments don’t improve in a few weeks, cut them away up to the healthy, green areas.

Use a clay pot as well–their heaviness helps keep bulkier cacti from tipping over; they also allow the soil to breathe, preventing the roots from rotting. [6] X Research source

Watering too much during the dormant season is the main cause of complications with cacti. [8] X Research source

Unless you have a cold-hardy cactus, be careful not to let the room temperature drop below freezing, since most cacti can’t tolerate frost. [12] X Research source

Replant the cactus at the same level in the soil as it was in the original pot.

You can avoid root rot by making sure the your pot has a hole in the bottom for drainage, and that it never sits in excess water that collects in a saucer underneath the pot.

Cacti do best after repotting if you transplant them during the growing season (March to September). Most cacti should generally be repotted every one-to-two years. [17] X Research source

Too much nitrogen gives the cactus a flabby texture that impedes its growth. [18] X Research source Never fertilize a cactus during the dormant season (October to February). [19] X Research source