I created 951 chickens in Riften. How do I get rid of them all?
Solution 1:
So I experimented a bit by recreating your situation and found a couple of possible solutions that I've listed below. These console command suggestions come with no warranty.
However, I found that after waiting roughly 30 seconds the chickens started despawning. So, perhaps you just need to deal with the clucking for a bit?
While this isn't the ideal solution, you can kill all non-essential actors with the following command. It will most certainly solve your chicken problem at a pretty high cost.
Command: killallactors
Kills all loaded (in currently rendered cells) non-essential actors (NPCs and creatures) immediately. Essential actors will be knocked down. The code killall can be used for identical effect.
I also experimented with the resetinterior command which will reset the cell to default (which lacks 951 chickens).
Command: resetinterior This command will reset an entire dungeon or location to default, including monsters, traps, chests and loot. E.g., ResetInterior Stillborncave01 or ResetInterior 00015206 would reset the dungeon Stillborn Cave to default; all monsters, traps, and loot would be respawned. If you reset a cell you have just been to, you'll need to use pcb command (purge cell buffer) as well, or the game will reload the buffered version of the cell, with all the modifications you've made to it. Both editorID and formID are acceptable in this command. Using this command in player homes appears to reset the furnishings without clearing the contents of initially empty containers (viz., the bedroom chest)
You can use this site to find the formID/editorID
Sources: Skyrim Wiki