Wallpaper hangers apply sizing to painted walls before hanging the wallpaper, because it makes installation easier and also facilitates in future removal of the wallpaper. While the wallpaper may be easier to remove on a sized wall, the glue residue and sizing itself can be very difficult to remove. If you're left with brown residue on the wall despite scrubbing and sanding, that's the sizing. You cannot paint right over it because weeks later, as the paint cures, it will start to crack and peel. The key to painting over wallpaper sizing is using the correct primer.
Protect the floor under the walls with dust sheets or rosin paper taped along the edges. If you get any primer on the floor, it will be almost impossible to remove once dry.
Fill gouges, dents and other imperfections on the wall with spackle or joint compound. Allow it to dry.
Sand the walls with sanding blocks or a drywall sander and extension pole until they feel smooth under your hand. Wipe the dust away with a damp, lint-free rag.
Apply painter's tape to the edges of trim, along the ceiling and any adjacent surfaces you're not painting. Press it down firmly with your finger to prevent primer and paint from bleeding underneath.
Brush one coat of oil-based or tinted shellac primer around the trim and along the ceiling, using a 2- or 3-inch brush.
Roll an even coat of primer on the main part of the walls and allow it to dry. Oil-based primer typically takes about eight hours to dry, while tinted shellac will be dry in about an hour.
Apply two coats of latex paint to the walls, allowing about four hours of drying time in between coats. Remove the painter's tape when the walls are completely dry.
Ask the paint store to tint the primer to the approximate shade of paint you'll be using.
Open windows and use fans to dissipate strong primer fumes. Don't use water-based primer over wallpaper sizing or glue; it will not effectively seal it.