Only growth capex is discretionary. A company can cut it in a downturn; cutting maintenance capex just moves the bill into the future. Separating the two is the difference between a genuine free-cash-flow estimate and a flattering one.
Companies almost never disclose the split, so analysts estimate it, most simply by using depreciation-accounting as the proxy, or by scaling historical capex per unit of capacity.
Example: Northwind Tools does not disclose a split. Using depreciation of $64M as maintenance, owner earnings are $164M of operating cash flow less $64M, or $100M, against reported free cash flow of $89M.
Related: capex, free-cash-flow, unlevered-free-cash-flow, discounted-cash-flow