How do I get rid of corpses that don't despawn on their own?

This error, and many more, are fixed up in the Unofficial Patch series for the Dragonborn DLC:

UDBP Fixes Dragonborn (DLC2MQ01) lost a property for cleaning up the cultist bodies after the ambush is over. DLC2WE09 also needed to be added for shutdown. (Bug #14121)

For a complete list of the change logs you can go to the change log. This patch is available through many sites like Nexus but is not available any longer through the Steam Workshop (this is due to restrictions in the Content Creator). I -highly- recommend getting comfortable installing the mod via the Nexus Mod Manager (simple easy to use interface that handles installing and uninstalling the files for you) as the Unofficial Patches are almost a requirement to play Skyrim bug free.


James' answer is correct for the OP's specific situation, but with the following command you can completely (not only visually) get rid of anything in-game:

Use the MarkForDelete command

[MarkForDelete] marks an object for actual deletion: when the system does its normal clean up, the object will be deleted, and its script will no longer be active.

To do so,

  • get the unwanted object directly in view;
  • go into the in-game console (using the key above the Tab key, usually ~ on QWERTY keyboards);
  • select the body or other unwanted object,
  • type in the disable command,
  • immediately followed by markfordelete.

This will get rid of the object completely, once the cell it's in unloads.

MarkForDelete allows a script to set the delete flag on a disabled reference, which places the reference in a queue for deletion a few frames later. It will not work on enabled references.

Whereas the disable command merely hides it from view, without unloading it:

When an object is disabled, it remains in memory and continues to process scripts.

Quotations from Creationkit.com