DELETE Doesn’t Delete Data: Understanding DELETE, VACUUM, and Time Travel in Delta Lake

Author: Aishwarya Manoharan

17 July, 2026

Why Your Storage Bill Didn’t Go Down After Deleting Data 

Your Delta table has grown to 20 TB. 

To reduce storage costs, you have decided to remove several years of obsolete data: 

DELETE FROM transactions
WHERE transaction_date < ‘2022-01-01’; 

Millions of records disappear. 

The query succeeds. 

Everyone expects the storage bill to drop. 

A week later, the table is smaller logically, but the storage consumption is exactly the same. 

What happened? 

The answer lies in one of Delta Lake’s most important design decisions: 

DELETE removes data logically, not physically. 

Understanding this distinction is essential not only for storage optimization, but also for compliance requirements such as GDPR and the “Right to Erasure.” 

The Common Assumption 

Most people think of a DELETE statement as: 

DELETE record
       ↓
Data removed from storage
       ↓
Storage usage decreases 

That mental model works for many traditional systems. 

Delta Lake works differently. 

When a DELETE operation occurs, Delta does not immediately remove the underlying data files from storage. Instead, it creates a new version of the table that no longer references those records.  

The old files continue to exist. 

As a result: 

  • Query results change immediately  
  • Storage consumption remains unchanged  
  • Historical versions remain recoverable  

What DELETE Actually Does 

Consider a simple Delta table. 

Before deletion: 

Version 1
File A
|_ Transaction 1
|_ Transaction 2
|_ Transaction 3
|_ Transaction 4 

You execute: 

DELETE FROM transactions
WHERE id = 2; 

Delta creates a new table version: 

Version 2
File B
|_ Transaction 1
|_ Transaction 3
|_Transaction 4 

The important detail: 

File A still exists in cloud storage. 

Delta updates the transaction log to indicate that Version 2 should use File B instead. 

The old file is no longer part of the active table state, but it has not been physically removed. 

Why Delta Works This Way 

At first glance, this may seem inefficient. 

Why not simply remove the data immediately? 

Because keeping old files enables some of Delta Lake’s most valuable capabilities: 

  • ACID transactions  
  • Reliable rollback  
  • Auditability  
  • Concurrent writes  
  • Time Travel  

Without historical files, recovering from accidental updates or deletions would be far more difficult. 

Delta Lake intentionally prioritizes reliability and recoverability over immediate storage reclamation. 

Understanding Time Travel 

Because old files remain available, Delta Lake can reconstruct previous versions of a table. 

For example: 

SELECT *
FROM transactions VERSION AS OF 1; 

Even after records have been deleted from the current version, Delta can rebuild the historical snapshot using the transaction log and the older data files. 

This capability is incredibly valuable when: 

  • A bad deployment corrupts production data  
  • Someone accidentally deletes records  
  • An audit requires historical verification  
  • A pipeline introduces incorrect updates  

Time Travel is one of Delta Lake’s most powerful features. 

It’s also the reason your storage bill didn’t immediately decrease after the DELETE. 

The GDPR Perspective 

This behavior becomes particularly important when discussing data privacy regulations. 

Imagine a customer submits a GDPR “Right to Erasure” request. 

Your team executes: 

DELETE FROM customer_data
WHERE customer_id = 12345; 

The customer’s information disappears from current query results. 

Mission accomplished? 

Not necessarily. 

The historical files containing that customer’s data may still physically exist in storage. 

From a Delta Lake perspective: 

  • The data has been logically removed from the active table.  
  • The underlying files may still exist until retention policies allow them to be cleaned up.  

This doesn’t automatically mean a GDPR violation exists—organizations often implement additional retention and governance controls—but it does mean that understanding Delta’s storage model is critical when designing compliance processes. 

For teams handling regulated data, it is important to understand: 

  • Time Travel retention periods  
  • VACUUM schedules  
  • Data retention policies  
  • Governance requirements  

A DELETE statement alone may not achieve the outcome you expect from a compliance perspective. 

 

Enter VACUUM 

DELETE changes what users can see. 

VACUUM changes what storage contains. 

Example: 

VACUUM transactions RETAIN 168 HOURS; 

The retention period above is 168 hours (7 days). 

VACUUM permanently removes files that are: 

  1. No longer referenced by the active table version  
  1. Older than the specified retention threshold  

Only after VACUUM runs can storage actually be reclaimed. 

This is the operation that reduces storage consumption. 

A Simple Timeline:

Day 1
DELETE executed

Storage:
20 TB

Time Travel:
Available

—————-

Day 3
Old files still exist

Storage:
20 TB

Time Travel:
Available

—————-

Day 7
Retention threshold reached

Storage:
20 TB

Time Travel:
Available

—————-

Day 8
VACUUM executed

Storage:
14 TB

Time Travel:
Historical versions requiring deleted files may no longer be available 

—————-

The exact numbers will vary, but the principle remains the same: 

Storage savings arrive only after obsolete files are physically removed. 

DELETE vs VACUUM 

A useful mental model is: 

Operation What It Does 
DELETE Logical removal of data 
UPDATE Creates a new table version 
MERGE Creates a new table version 
Time Travel Reads historical versions 
VACUUM Physical file deletion 

Or even more simply: 

DELETE changes what users see. 

VACUUM changes what storage contains. 

The Trade-Off 

Delta Lake intentionally balances two competing goals. 

Keep Historical Files 

Benefits: 

  • Time Travel  
  • Auditability  
  • Easier recovery from mistakes  
  • Data lineage and troubleshooting  

Costs: 

  • Higher storage consumption  
  • Longer retention of historical data  

Remove Historical Files 

Benefits: 

  • Reduced storage costs  
  • Faster cleanup of obsolete data  
  • Better alignment with strict retention requirements  

Costs: 

  • Reduced recovery window  
  • Limited historical analysis  
  • Older Time Travel versions may become unavailable  

Every organization must decide where that balance belongs. 

 

Key Takeaways 

If you remember only three things from this article, remember these: 

  1. DELETE does not immediately remove data files from storage. 
  2. Time Travel works because historical files continue to exist. 
  3. VACUUM is what actually removes obsolete files and reduces storage usage.  

The next time someone asks why storage costs haven’t decreased after deleting millions of rows, the answer is usually not that the DELETE failed. 

The answer is that Delta Lake is preserving history. 

Deleted records may no longer appear in current query results, but the underlying files often remain available for recovery, auditing, and Time Travel. 

Only when VACUUM removes those obsolete files does the storage footprint truly shrink. 

And that’s one of the most important—and most misunderstood—concepts in Delta Lake.

To explore Databricks Solutions or cleaning up data, contact Xorbix Technologies to learn more. 

camilo-rueda-lopez-3CLPBgNuX40-unsplash
vdab_blog_2
Rectangle 5938
Modernizing Heavy Equipment Operations with a Multi-Platform Manuals & Documentation Tool

Let’s Start a Conversation

Request a Personalized Demo of Xorbix’s Solutions and Services

Discover how our expertise can drive innovation and efficiency in your projects. Whether you’re looking to harness the power of AI, streamline software development, or transform your data into actionable insights, our tailored demos will showcase the potential of our solutions and services to meet your unique needs.

Take the First Step

Connect with our team today by filling out your project information.

Address

802 N. Pinyon Ct,
Hartland, WI 53029

[forminator_form id="56446"]