Yes, we should remove dead links if they can't be replaced.
They don't bring anything good to the post, so there is no reason to keep them around.
If the post does not make sense when removing the dead link, and you can't find a way to retrieve the meaning of the post, you should flag the post for a moderator's attention and describe the situation. The course of action is probably to have the whole post deleted.
If you review a new post, or a post from a new user and notice that they posted links to "shaky" resources, such as their DropBox or Google Drive, you should encourage them to upload the content to a more stable external source such as Stack's Imgur for images (using the tool in the edit bar), or YouTube for videos. For the code, well they should post it straight to the post (and if "it's too big", they should narrow the scope before posting, so vote to close :P).