Have you ever deleted a Pen by accident?
It used to be a painful mistake to make on CodePen — in the past, if you deleted a Pen it was gone for good, right away.
But those days are over!
We updated how deleting a Pen works to make it a bit harder to delete something by mistake. And now there's a way to recover a Pen if you realize you didn't want to delete it after all.
Starting now, you have three days to restore a copy of your deleted Pen from your Dashboard. The copy contains all of your code, external resources, and settings from your last save so you can get back to work on your Pen.
New Confirmation Flow for Deleting a Pen
When you delete a Pen from the Pen editor, your Dashboard, or your profile page, you'll be asked to confirm deletion.
Views, hearts, comments, and tags are permanently deleted when you delete a Pen and can't be restored, and we let you know about that on the confirmation modal.
The "Deleted" Section of Your Dashboard
When you delete a Pen, a copy of the Pen is saved to the "Deleted" section of your Dashboard for three days.
You can restore your Pen from the "Deleted" tab within 3 days after you delete the Pen. After 3 days, the Pen is permanently deleted and can't be restored.
The restored copy includes all of your code, resources, preprocessors, and Pen settings from your last save on the Pen — everything you need to start working on the Pen again. Views, hearts, comments, and tags are not restored.
Most deletions aren't a mistake, and we know that sometimes when you delete something it needs to be GONE.
In that case, you can permanently delete the Pen from your "Deleted" tab. Click the "Delete Permanently" button, then confirm deletion on the modal. This action immediately and permanently deletes the Pen. So be very sure you don't want the Pen! Once a Pen is permanently deleted, it is truly gone forever.
Just Pens, for Now
Pens were the #1 most accidentally deleted item on CodePen by far, so we decided to get this feature out for Pens first. At launch (May 2019) this feature is only available for Pens, but we plan to expand it to Posts, Collections, and Projects in the future.