Answers.Body: <p>Tried it here and seems ok. Once you have deleted your field, are you saving your matrix block (top right button)?</p>
  
  <p>If you delete the field then try to recreate it straight away (or any other field for that matter), it gives you the <em>Handle "videoUrl" has already been taken.</em> until you save the block. Once you save, you should be ok to recreate.</p>
  
  <p>It does seem a bit buggy though as you need to save in between each action... Might need to see what the craft guys think.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T11:15:07.667Z
Answers.Text: Embed isn't even listed in the admin area as a field handle - but is still treated as one.
Answers.UserDisplayName: Dan Lee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T11:23:31.343Z
Answers.Text: Did you leave the page without saving at some point? This might have created the problem. Do you see the field in the Db?
Answers.UserDisplayName: Oli
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T11:25:05.980Z
Answers.Text: Very possible - I'm taking a look now in the DB.
Answers.UserDisplayName: Dan Lee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T11:26:50.260Z
Answers.Text: I have tried deleting a field from a block in the Db just now and it doesn't seem to cause problem so you should be safe to do that. Back up before in case... :)
Answers.UserDisplayName: Oli
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T11:27:05.670Z
Answers.Text: Yes it is still there
Answers.UserDisplayName: Dan Lee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T11:27:34.323Z
Answers.Text: I'd say back up and delete to see...
Answers.UserDisplayName: Oli
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T11:05:05.843Z
Answers.LastActivityDate: 2019-02-19T11:05:05.843Z
Answers.UserDisplayName: Oli
Answers.Body: <p>So I used the following to find unused fields in the database. Then I manually removed them. Please backup before doing this!</p>
  
  <pre><code>SELECT f.* FROM fields f LEFT JOIN fieldlayoutfields l ON l.fieldId = f.id WHERE l.id IS NULL
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T11:54:13.670Z
Answers.LastActivityDate: 2019-02-19T11:54:13.670Z
Answers.UserDisplayName: Dan Lee
Body: <p>I'm working with Matrix field. When adding and then removing and then adding again fields with the same handle I get the following error.</p>
  
  <p><em>Handle "videoUrl" has already been taken.</em></p>
  
  <p>Is there a way of removing old handles that are not being used?</p>
  
  <p>This is actually creating issues adding new fields with a different handle too. Even though a new handle is being used an old handle is being referenced as a blocker to adding a new field. I get the following error when trying to save a post.</p>
  
  <p><strong><em>Invalid field handle: embed</em></strong></p>
  
  <p>'Embed' isn't even listed in the field manager area as a field handle but the problem persists.</p>
  
Tags: <craft3><matrix>
Title: Removing old Block Handles in Matrix Field?
ThreadText: # Removing old Block Handles in Matrix Field?
  
  (Asked by: username_0 on 2019-02-19)
  
  I'm working with Matrix field. When adding and then removing and then adding again fields with the same handle I get the following error.
  
  *Handle "videoUrl" has already been taken.*
  
  Is there a way of removing old handles that are not being used?
  
  This is actually creating issues adding new fields with a different handle too. Even though a new handle is being used an old handle is being referenced as a blocker to adding a new field. I get the following error when trying to save a post.
  
  ***Invalid field handle: embed***
  
  'Embed' isn't even listed in the field manager area as a field handle but the problem persists.
  
  **Tags:** craft3, matrix
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-02-19. Score: 1
  
  Tried it here and seems ok. Once you have deleted your field, are you saving your matrix block (top right button)?
  
  If you delete the field then try to recreate it straight away (or any other field for that matter), it gives you the *Handle "videoUrl" has already been taken.* until you save the block. Once you save, you should be ok to recreate.
  
  It does seem a bit buggy though as you need to save in between each action... Might need to see what the craft guys think.
  
  > **Comments:**
  > **username_0**: Embed isn't even listed in the admin area as a field handle - but is still treated as one.  
  > **username_1**: Did you leave the page without saving at some point? This might have created the problem. Do you see the field in the Db?  
  > **username_0**: Very possible - I'm taking a look now in the DB.  
  > **username_1**: I have tried deleting a field from a block in the Db just now and it doesn't seem to cause problem so you should be safe to do that. Back up before in case... :)  
  > **username_0**: Yes it is still there  
  > **username_1**: I'd say back up and delete to see...  
  
  ---
  
  ### Answer by username_0 on 2019-02-19. Score: 0
  
  So I used the following to find unused fields in the database. Then I manually removed them. Please backup before doing this!
  
  ```
  SELECT f.* FROM fields f LEFT JOIN fieldlayoutfields l ON l.fieldId = f.id WHERE l.id IS NULL
  
  ```
  
  
  ---
  
  