Index: django/db/models/fields/files.py
===================================================================
--- django/db/models/fields/files.py	(revision 11327)
+++ django/db/models/fields/files.py	(working copy)
@@ -22,6 +22,7 @@
         self.field = field
         self.storage = field.storage
         self._committed = True
+        self._replaced = []
 
     def __eq__(self, other):
         # Older code may be expecting FileField values to be simple strings.
@@ -206,7 +207,20 @@
         return instance.__dict__[self.field.name]
 
     def __set__(self, instance, value):
+        if self.field.delete_replaced:
+            previous_file = instance.__dict__.get(self.field.name)
         instance.__dict__[self.field.name] = value
+        if self.field.delete_replaced and previous_file:
+            if previous_file:
+                # Rather than just using value, we get the file from the
+                # instance, so that the __get__ logic of the file descriptor is
+                # processed. This ensures we will be dealing with a FileField
+                # (or subclass of FileField) instance.
+                file = getattr(instance, self.field.name)
+                # Remember that the previous file was replaced (along with any
+                # files which the previous file replaced too).
+                file._replaced += previous_file._replaced
+                file._replaced.append(previous_file)
 
 class FileField(Field):
     # The class to wrap instance attributes in. Accessing the file object off
@@ -216,7 +230,8 @@
     # The descriptor to use for accessing the attribute off of the class.
     descriptor_class = FileDescriptor
 
-    def __init__(self, verbose_name=None, name=None, upload_to='', storage=None, **kwargs):
+    def __init__(self, verbose_name=None, name=None, upload_to='',
+                 storage=None, delete_replaced=False, **kwargs):
         for arg in ('primary_key', 'unique'):
             if arg in kwargs:
                 raise TypeError("'%s' is not a valid argument for %s." % (arg, self.__class__))
@@ -225,6 +240,7 @@
         self.upload_to = upload_to
         if callable(upload_to):
             self.generate_filename = upload_to
+        self.delete_replaced = delete_replaced
 
         kwargs['max_length'] = kwargs.get('max_length', 100)
         super(FileField, self).__init__(verbose_name, name, **kwargs)
@@ -247,9 +263,18 @@
     def pre_save(self, model_instance, add):
         "Returns field's value just before saving."
         file = super(FileField, self).pre_save(model_instance, add)
-        if file and not file._committed:
-            # Commit the file to storage prior to saving the model
-            file.save(file.name, file, save=False)
+        if file:
+            if self.delete_replaced:
+                # Delete any files which this one replaced.
+                queryset = model_instance._default_manager.exclude(
+                                                    pk=model_instance.pk)
+                for replaced_file in file._replaced:
+                    if replaced_file._committed:
+                        self.safe_delete_file(replaced_file, queryset)
+                file._replaced = []
+            if not file._committed:
+                # Commit the file to storage prior to saving the model
+                file.save(file.name, file, save=False)
         return file
 
     def contribute_to_class(self, cls, name):
@@ -258,16 +283,26 @@
         signals.post_delete.connect(self.delete_file, sender=cls)
 
     def delete_file(self, instance, sender, **kwargs):
+        """
+        Signal receiver which deletes an attached file from the backend when
+        the model is deleted.
+        """
         file = getattr(instance, self.attname)
-        # If no other object of this type references the file,
-        # and it's not the default value for future objects,
-        # delete it from the backend.
-        if file and file.name != self.default and \
-            not sender._default_manager.filter(**{self.name: file.name}):
+        self.safe_delete_file(file, sender._default_manager.all())
+    
+    def safe_delete_file(self, file, queryset):
+        """
+        Deletes the file from the backend if no objects in the queryset
+        reference the file and it's not the default value for future objects.
+        
+        Otherwise, the file is simply closed so it doesn't tie up resources.
+        """
+        if file:
+            queryset = queryset.filter(**{self.name: file.name})
+            if file.name != self.default and not queryset:
                 file.delete(save=False)
-        elif file:
-            # Otherwise, just close the file, so it doesn't tie up resources.
-            file.close()
+            else:
+                file.close()
 
     def get_directory_name(self):
         return os.path.normpath(force_unicode(datetime.datetime.now().strftime(smart_str(self.upload_to))))
