How can I avoid repainting a wall after removing pictures?
As @jphi1618 said, if the spackle isn't a color match (and it usually isn't), a bit of local touch-up with paint of the right color can solve the problem. 

If you don't have leftover paint stored away, hit the paint store for sample chips and use them to find a match. Once you know what color you need, and have figured out whether the surrounding paint is flat or semigloss, see if the store offers 8-ounce samples; those are cheap enough that you can afford to experiment if you aren't sure of your choice. 

Try to match the existing texture, and to "feather"/dry-brush the edges of tge new oaint so it blends into what's already there.

It won't be perfect. But it will probably be good enough that nobody but you ever notices it.