Never, unless you are very tight on memory and doing something very bulky. If you are writing usual program, garbage collector should take care of everything.
If you are writing something bulky, you should know that del does not delete the object, it just dereferences it. I.e. variable no longer refers to the place in memory where object data is stored. After that it still needs to be cleaned up by garbage collector in order for memory to be freed (that happens automatically).
There is also a way to force garbage collector to clean objects - gc.collect(), which may be useful after you ran del. For example:
import gc a = [i for i in range(1, 10 ** 9)] ... del a # Object [0, 1, 2, ..., 10 ** 9 - 1] is not reachable but still in memory gc.collect() # Object deleted from memory
Update: really good note in comments. Watch for other references to the object in memory. For example:
import gc a = [i for i in range(1, 10 ** 9)] b = a ... del a gc.collect()
After execution of this block, the large array is still reachable through b and will not be cleaned.
delis very rarely useful.delis useful for me are: deleting items from lists, dicts or the like - or when you dont need large objects anymore but they are in a namespace that is going to exist for a long time (eg module-level od in really-long-running-functions).delmay be useful if the algorithm employed by the garbage collection of your Python implementation delays the destruction of out-of-scope objects. E.g., you can read on PyPy's vs. CPython's implementations of garbage collections to see in which instancesdelmay become useful (as a rule, very rarely).