Is it okay to install a "window" air conditioner in an thru-wall A.C. box?

Here’s my situation: One dead A/C unit sitting in a thru-wall sleeve/box. One perfectly good A/C unit installed on a window sill, looking ugly and taking up valuable window space.

I want to ditch the dead wall unit and put the window A/C in its place. Assuming there are no size issues, is it okay/safe to do this? If so, what precautions must I take?

I assume I should seal up the sides to prevent the heated exhaust air from drifting into the room, right? Anything else?

Shouldn’t be a problem. Make sure the new one is installed so the condensate drains outside rather than into your home and you should be fine.

Years ago, I did a lot of window and thru-the-wall A/C installations as a side job.
Look at the opening of the sleeve, and think of it as an open window. Measure the interior of the sleeve to be sure the unit isn’t going to fall to the street when you stick it in there. If it’s going to fit, it’s probably going to sit on the side rails that the unit made for it would slide on when you installed that one. (that make sence?) If your window unit has accordion sides, pull them out to close up the side gaps, otherwise, cut and measure some 1/4 inch ply, and use that to cover the gap. Figure out a way to permanently connect the unit to the sleeve…metal screws or small angle iron. You don’t want it moving in the sleeve. Use that grey caulk that you can mold, and cover any opening to the outside. Oh, and do what CHEFGUY said about drainage. Don’t assume that the sleeve was installed with a pitch for drainage. I used to curse the carpenters who thought the sleeve was to be installed level and plumb. Put a level on the sleeve and you want it slightly off-bubble. If your sleeve isn’t pitched, pitch your window unit…a couple of shims will work.
.

All good advice so far, and I’ll just add one more provision: check to make sure the sleeve doesn’t cover up any vents. Some window a/c units will assume that airflow will be available from the top, bottom and/or sides of the outside section of the unit, and you might have problems (like an overheating motor or compressor) if that airflow is blocked.