Deducting cost of repairs / improvements after renting property but before selling it

We have been renting out an apartment for several years. This year we had a vacancy and did a bunch of work to get it ready for a new tenant (extra cleaning, repair blinds, replace waste disposal, install new window air conditioner where there wasn't one previously). We then decided to sell the property instead of renting it out again. So my question is, are any of these deductible?

 

We paid these expenses at a point when we expected to continue renting this property, and we did then list the property for rent again. But we did not subsequently get a paying tenant. On the other hand, these will probably all be more than 90 days before the sale closes, so I don't think they can be counted as expenses of the sale. But maybe the air conditioner can at least be treated as a capital improvement, since it is a large unit that required changes to the window frame and can't easily be removed?

 

Thanks for any advice you can give.