You can enable cleaning workspace in the pipeline. It will clean directory next time the one for given job is picked up
- job: myJob
workspace:
clean: outputs | resources | all # what to clean up before the job
It will not clean all of this above.
For that you please enable maintenance job
You can configure agent pools to periodically clean stale working directories and repositories. This should reduce the potential for the agents to run out of disk space. Maintenance jobs are configured at the project collection or organisation level in agent pool settings.
These directories contains source code, compiled code etc. This specific directories are just working directories for you jobs.
ANd yes you can delete them manually. Nothing bad will happen. Next time job will download all what is needed to performs steps.