How often does a landlord have to replace carpet or repaint in rental unit?

I just moved out of the old apartment in Los Angeles, and I had lived there for more than 5 years. The landlord didn't return my deposit and saying that he need to replace a new carpet and paint the whole apartment. When I moved in he didn't even changed the new carpet, he just shampooed the carpet. Anyway,... show more I just moved out of the old apartment in Los Angeles, and I had lived there for more than 5 years. The landlord didn't return my deposit and saying that he need to replace a new carpet and paint the whole apartment. When I moved in he didn't even changed the new carpet, he just shampooed the carpet. Anyway, I heard that the landlord are supposed to replace a new carpet or repaint the apartment after certain years I am not sure how often but he never did anything when we lived there for more than 5 years. So what is the law in LA county?
3 answers 3