To prevent unlimited 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. The two variables that control the deletion are
kept-new-versions. Their values are, respectively
the number of oldest (lowest-numbered) backups to keep and the number of
newest (highest-numbered) ones to keep, each time a new backup is made.
The values are used just after a new backup version is made;
that newly made backup is included in the count in
By default, both variables are 2.
delete-old-versions is non-
middle versions are deleted without notification. If it is
default, you are asked whether the excess middle versions should
really be deleted.
You can also use Dired’s . (Period) command to delete old versions. See Dired.