Blog Post

Azure PaaS Blog
2 MIN READ

Lifecycle Management of Azure storage blobs using Azure Data Factory (ADF)

Deeksha_S_A's avatar
Deeksha_S_A
Icon for Microsoft rankMicrosoft
Mar 31, 2025

Background: 

Many times, we have a requirement to delete the page blobs automatically after certain period of times from the Storage account as currently Lifecyle management does not support Page blob deletion 

Note:  we can delete All blobs (Page/Block/Append blob) from the ADF 

 Deletion of page blobs (or any blob type) from the storage account can be achieved using Azure Storage explorer, REST API, SDK’s, PowerShell, Azure Data Factory, Azure logic App, Azure Function app, Azure storage actions (Preview) etc.

This blog shows how to use ADF to delete blobs. 

Step 1: 

Create an azure data factory resource from azure portal.  If you are new to ADF, please refer this link on how to create one:  https://docs.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-portal 

Step 2: 

From the overview blade, select 'Open Azure Data Factory Studio'. 

 

Step 3: 

On the data factory portal click on the pen item -> + > Create pipeline  

 

Step 4: 

Click on the Pipeline that has been created -> Under Activities -> General-> select ‘Delete’ and drag it to the pipeline area.

 

 

Step 5: 

Under Source -> Select New. For Datasource =-> choose Azure Blob Storage 

 Step 6: 

In the New linked service, you can use the name that is by default or customize as per requirement  

If the account selection method is azure subscription you can choose the storage account, else you can enter manually too. 

Then click on ‘Create’ 

 

 Step 7: 

In the file path: enter the container and folder/Directory name (according to your requirement) 

Step 8:  

Returning to the pipeline, you can configure the following properties as depicted in the image:

 

 

Note: If you would like to delete only blobs based on last modified you can use "Filter by last Modified" option 

Step 9 : 

Click on Debug, to run the pipeline: 

 

We can validate the pipeline activity in the output tab 

 Note:  

Use Add Trigger to manually start the pipeline. 

https://docs.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-portal#trigger-the-pipeline-manually 

Use Add Trigger to schedule the pipeline. 

https://docs.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-portal#trigger-the-pipeline-on-a-schedule 

 References:  

https://techcommunity.microsoft.com/blog/azurepaasblog/efficient-management-of-append-and-page-blobs-using-azure-storage-actions/4281019 

https://techcommunity.microsoft.com/blog/azurepaasblog/lifecycle-management-for-page-blob-and-block-blob-using-function-app-/2801787 

https://techcommunity.microsoft.com/blog/azurepaasblog/delete-all-the-azure-storage-blob-content-before-n-days-using-logic-app/838870 

Updated Mar 27, 2025
Version 1.0
No CommentsBe the first to comment