Remove trash folder from hdfs




I am using labs,and when i delete data from hdfs ,I see it move to the trash directory
I understand i can use the --skipTrash option

But if i don’t use it,Should i explicitly delete contents from trash
example from hdfs://
or do you have a process in place for cleanup?


@itversity Can someone from the labs team please respond to my above query?


Hi @vm109

Once you have deleted your files from HDFS, then those deleted files will be moved to trash. I’m pretty sure that itversity Hadoop administrators has setup trash ‘expunge’ policy, if not this is by default set to 360 minutes. Once you have performed delete, it’s not your activity to take care of it from trash. it will handled by Hadoop automatically.

otherwise you can use below command to expunge in manually:

hadoop fs -expunge