Try this code. I didn't check.
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"DownloadDidSuccessNotification" object:nil];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSFileManager *fileMgr = [NSFileManager defaultManager] ;
NSError *error = nil;
BOOL removeSuccess = [fileMgr removeItemAtPath:targetPath error:&error];
if (!removeSuccess) {
// Error handling
...
}
[[NSNotificationCenter defaultCenter] postNotificationName:@"DownloadDidFailedNotification" object:nil];
}];