It depends. If you have a truck - capital asset - the oil changes are probably opex, but replacing the transmission is probably capex. Regular sweeping and cleaning of a building is likely opex, upgrading the wiring capex. Software I can certainly see getting tricky here - is updating dependancies an oil change or a transmission?
"Betterment, restoration or adaptation" is the usual test for something being capex.
"Betterment, restoration or adaptation" is the usual test for something being capex.