Long-term memory (LTM) allows animals to use remote past experiences to guide current and future decisions. One of the widely used animal models for LTM research is the fruit fly Drosophila melanogaster. Up to now, three types of aversive olfactory LTM have been reported, however, their interrelationships are still unknown. Here, such interrelationships include mutual exclusion and co-expression. Single-trial aversive olfactory training yields two types of LTM, including context-dependent LTM (cLTM) and merged LTM (mLTM). These two LTMs can co-express and cooperate to guide the behavior. Spaced training-induced LTM (spLTM) requires multiple repeated learning trials with 15-min resting intervals between each trial. Formation but not retrieval of such spLTM suppresses cLTM expression, suggesting a exclusive relationship between them. Thus, our data suggest that animals may organize different LTMs to avoid the occasional and repeated dangers in the natural environment.