Is there a general rule for the prefixation of "un-" and "de-" to words?

Solution 1:

Some prescriptive grammarians would argue that the de- prefix should be used on verbs and un- should be used on adjectives.

So, you deregister something and it becomes unregistered, or you deselect something and it is now unselected.

The logic behind this is probably because de- only attaches to verbs to give the notion of reversal, so for the sake of order/non-redundancy/etc. you'd want un- to occupy the other domain: yielding the opposite meaning of an adjective it attaches to, and nothing else.

However, it has never really worked this way; the prefix redundancy among verbs is there, and it is very unlikely to disappear. Note that, most of the time, you can't just use whichever one you want — usually there is one preferred form. But whether it is un- or de- is something that varies on a word-by-word basis.

FumbleFingers mentioned something else in comments that is worth mentioning: un- seems to be much more widespread, even in the verbal realm, in the production of new words in the past few decades.

Solution 2:

Very broadly, de- is more likely to indicate action, whereas un- is more likely to connote a passive status: After you detune your guitar, it is an untuned guitar.

In practice, of course, there are so many exceptions and counterexamples as to render this "rule" largely meaningless. I would guess, though, that people are somewhat more likely to follow this convention than the opposite when coining ad-hoc new words from existing roots (example: to deselect a check box in a computer GUI is an action, whereas unselected is a status that the box can have).

Solution 3:

Among verbs, I believe that un- is used to intrinsically undo something (eg, uncreating an object) whereas de- means to reverse its effects (eg, decompiling a program), without modifying the original item.

Examples

  • One might want to unsay something—to take back the fact that it was said in the first place.

  • People become desensitized to things—their sensitivity is nullified.

  • People become demotivated—their motivation is reversed.

  • People unsubscribe from email lists—they get rid of their subscription

  • People unwrap things—they get rid of the original wrapping

  • Arguments are deconstructed—they are broken down and attacked; the argument itself is not destroyed.