Part 4️⃣ – Lifecycle, Portability & Automation #174757
Unanswered
shinybrightstar
asked this question in
Codespaces
Replies: 4 comments 3 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
To clean up stopped Codespaces you can use the GitHub CLI. First make sure you have [gh](https://cli.github.com/) installed and authenticated. Then run the following: # list all codespaces
gh codespace list
# delete all stopped codespaces
gh codespace list --state Stopped --json name -q '.[].name' | xargs -n1 gh codespace delete -c This will free up resources and prevent confusion when you have too many inactive environments. You can turn it into a small script and run it weekly so your future self does not have to sort through old codespaces. If this solved your issue please mark the answer as helpful so others can find it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
You’ve set up the essentials and started building with your team; now we’ll focus on lightweight habits and scripts that keep things organized as you scale, moving from simply staying aligned to making deliberate, confident decisions. Automating cleanup reduces busywork and protects your focus.
🧠 Learning Outcomes
🚀 Get Started in 2 Minutes
✅ publish
/✅ clean
/✅ rotate
.🛠 Quick Win Snippets
📦 1. Publish a Codespace prototype (copy/paste)
🧹 2. Delete stopped Codespaces (cleanup)
Dry-run: find candidates older than 3 days & stopped:
🔐 3. Rotate one secret (user-level)
(REST encryption flow example):
⏱ Bonus: Compare devcontainer build times
Repeat after devcontainer change with a different display name. Record both times.
🤖 Feeling Adventurous? (Lifecycle Script Sketch)
🧪 Example Cleanup Script (dry-run & execute)
Usage:
✍ Reflection
“What small script today would future-me thank me for?”
Use one of these to get started:
Drop your answer in the comments. You might just inspire someone else (or your future self).
Beta Was this translation helpful? Give feedback.
All reactions