Previous: , Up: Backing Up Files   [Index]


7.3.4.5 Automatic Backup Deletion

To prevent excessive consumption of disk space, Emacs can delete numbered backup versions automatically. Generally Emacs keeps the first few backups and the latest few backups, deleting any in between. This happens every time a new backup is made.

kept-old-versions—a variable

the number of oldest (lowest-numbered) backups to keep (default 2)

kept-new-version—a variable

the number of newest (highest-numbered) ones to keep (default 2)

delete-old-versions

if t, Emacs deletes the excess backup files silently. If nil, the default, Emacs asks you whether it should delete the excess backup versions. If any other value, Emacs never automatically deletes backups.

Dired ‘.’ command

can be used to delete old versions.