Can I deduct repairs (carpet, paint, etc) on a rental property that I sold after the tenants moved out?

Should the costs be under rental repairs because they were made necessary by tenants or as part of the selling costs?