We use vacuum to delete older data files in delta lake api.
From doc:
vacuum
deletes only data files, not log files. Log files are deleted automatically and asynchronously after checkpoint operations. The default retention period of log files is 30 days, configurable through thedelta.logRetentionDuration
property which you set with the ALTER TABLE SET TBLPROPERTIES SQL method.
So you don't have to run anything to clean the _delta_log
, old files are removed from it as new versions of the table are created.