# Why I can not delete my space?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhy-i-can-not-delete-my-space%2F174079%3E%5C
**Category:** Spaces\
**Created:** [March 8, 2026, 2:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhy-i-can-not-delete-my-space%2F174079 "2026-03-08T14:57:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![exact-railcar](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@exact-railcar](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fexact-railcar)%5C
**Post date:** [March 8, 2026, 2:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhy-i-can-not-delete-my-space%2F174079%2F1 "2026-03-08T14:57:50Z")

</div>

Why I can n ot delete my space [https://huggingface.co/spaces/exact-railcar/en](https://huggingface.co/spaces/exact-railcar/en)

it shows **400**

✖ Invalid input: expected object, received undefined  
→ at metadata  
✖ Invalid input: expected object, received undefined  
→ at compute  
✖ Invalid input: expected object, received undefined  
→ at storage  
✖ Invalid input: expected object, received undefined  
→ at service

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [March 9, 2026, 12:33am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhy-i-can-not-delete-my-space%2F174079%2F2 "2026-03-09T00:33:44Z")

</div>

There have been similar cases in the past. Probably a bug on the HF Hub side…

* * *

This looks like a **Hub/Spaces-side bug** , not a normal app error.

Your post shows the settings page failing validation with:

- `Invalid input: expected object, received undefined → metadata`
- the same for `compute`, `storage`, and `service`

That pattern matches several earlier Hugging Face forum reports where Spaces got stuck in a bad state, returned `400 "metadata" is required`, could not be opened or deleted, and later either recovered on their own or had to be removed by HF staff. In one case, the issue disappeared by itself; in another, staff manually deleted the broken Spaces. ([Hugging Face Forums](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2F400-error-metadata-is-required-on-all-spaces-ive-created-in-the-past%2F72355 "400 Error "metadata" is required on All Spaces I've created in the past - Spaces - Hugging Face Forums"))

## What I would try

### 1. Delete it from CLI or Python, not from the web UI

Hugging Face officially supports deleting a Space repo via both the CLI and `huggingface_hub` API. ([Hugging Face](https://huggingface.co/docs/huggingface_hub/guides/cli "Command Line Interface (CLI)"))

```bash
hf auth login
hf repos delete exact-railcar/en --repo-type space

```

Or:

```python
from huggingface_hub import HfApi
HfApi().delete_repo("exact-railcar/en", repo_type="space")

```

This is the best first move because the web settings page is clearly broken for that repo, while the delete API is a separate official path. The “bypass the UI” part is an inference, but it is the most sensible next step given the symptoms.

### 2. If delete still fails, push a minimal `README.md` first

HF’s docs say a Space’s configuration lives in the YAML block at the top of `README.md`. For Docker Spaces, `sdk: docker` and `app_port` are part of that metadata. ([Hugging Face](https://huggingface.co/docs/hub/spaces-config-reference "Spaces Configuration Reference"))

A minimal example:

```yaml
---
title: Temp Repair
emoji: 🧪
colorFrom: gray
colorTo: gray
sdk: docker
app_port: 7860
---

```

Then add a trivial `Dockerfile` if it is a Docker Space:

```dockerfile
FROM python:3.11-slim
CMD ["python", "-m", "http.server", "7860"]

```

Why this may help: one user with the same deletion problem said they fixed it by uploading a `Dockerfile` or any file with `huggingface-cli`, and another reported that once the Space recovered enough to show “No application file found,” they restored `README.md` metadata with a git push and were then able to delete it. ([Hugging Face Forums](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcan-not-delete-space%2F127843 "Can not delete space"))

### 3. If it is still stuck, escalate as an account/site issue

In prior threads, HF staff manually deleted broken Spaces after users asked in the forum. The forum also points users with website/account problems to `website@huggingface.co`. ([Hugging Face Forums](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcan-not-delete-space%2F127843 "Can not delete space - Spaces - Hugging Face Forums"))

Include:

- your HF username
- the Space name: `exact-railcar/en`
- that the Settings page returns 400 with missing `metadata/compute/storage/service`
- whether CLI delete also failed, and the exact error

## My read

Most likely this is one of the recurring **“ghost/broken Space metadata”** failures on the Hub. If you want the fastest path, I would do this order:

1. `hf repos delete ... --repo-type space`
2. if that fails, push minimal `README.md` metadata and retry delete
3. if that fails, post the CLI error in the forum thread and ask HF staff to remove the repo manually
