A320
Flight Crew Multiengine; Flight Crew Air Transport Pilot (ATP); Flight Crew Instrument
Troubleshooting; Workload
Aircraft Equipment Problem Less Severe; Deviation / Discrepancy - Procedural Published Material / Policy; Flight Deck / Cabin / Aircraft Event Smoke / Fire / Fumes / Odor
Aircraft Equipment Problem Dissipated; Flight Crew Overcame Equipment Problem; General Maintenance Action
Aircraft
Previous flight was an overnight.  Dark aircraft upon arrival; started APU and used APU bleed and packs at gate. Shortly after takeoff; both the FO (First Officer) and I began smelling a 'dirty sock' odor coming from the vents in the cockpit.  This began faintly and became stronger for a few minutes.   I went on oxygen intermittently and the odor was mostly gone by the time we were climbing through 10;000 MSL.   I asked the inflight crew if they had detected anything in the cabin and they had not.  We notified Dispatch and Maintenance Control and were requested to continue to ZZZ1.  Strong 'dirty sock' odor returned in descent at approximately FL 230.  Persisted for approximately 10 minutes.   PACK 1 was turned off which seemed to help some.  However; odor came back strong again a few minutes later even with PACK 1 off.  The FO and I again used oxygen intermittently.   Odor mostly dissipated prior to landing. Airbus Cabin Odor Reporting Form completed.  The aircraft has a history of APU auto-shutdowns:  no less than five in the last few weeks.
Air Carrier Captain reported a fume event localized to the flight deck during initial climb which dissipated  and resumed during descent. After troubleshooting and conferring with Maintenance the flight continued to destination.