Hi again, in Prefect Cloud, once you have register...
# ask-community
d
Hi again, in Prefect Cloud, once you have registered a new block, how does one remove it? So far I can't find anything in the documentation.
1
b
Hi David, you should be able to delete the block by selecting the menu button to the right of the block record.
d
@Bianca Hoch I think you're misunderstanding my question. I registered a new block type in the Cloud, but now I want remove that type. Specificially, I created this Azure Key Vault Credentials block and now I want that removed.
There is nothing in the UI I can see that can remove that type
perhaps there is a command line option to remove it?
k
does uninstalling the collection remove the block type?
upvote 1
d
@Kalise Richmond how do I do that? Also this a block that I created, not part of the known collections Prefect provides
a custom block
🤔 2
k
You can delete a block through a command line by typing the following on the CLI
Copy code
prefect block type delete block-type
gratitude thank you 1
d
@Khuyen Tran I get a
Block Type 'AzureKeyVaultCredentials' not found!
error. I used this command:
prefect block type delete AzureKeyVaultCredentials
z
@David Beck I believe you will need to pass the slug, you can see it in
prefect block type ls
d
@Zanie using the slug yields a cannot delete block type error
z
Can you share the full output?
d
Cannot delete Block Type 'azure-key-vault-credentials'!
that is in fact the slug provided by the ls operation
z
Let me get a blocks expert in the thread 🙂 cc @alex
Let’s get some actual information about the error.. here’s a patch to add a log: https://github.com/PrefectHQ/prefect/compare/block-type-delete-status
a
Hmmm, that’s very interesting that you’re getting an error when trying to delete a block type. Have you used that block type to create any blocks?
z
You can install with
pip install git+<https://github.com/PrefectHQ/prefect@block-type-delete-status>
d
@alex I did create a block but I have since deleted that block
@Zanie
Copy code
Received error from the the API: {'exception_message': 'Internal Server Error'}
Cannot delete block type 'azure-key-vault-credentials'! Status code 500.
that's the error revealed after doing that install
z
Thanks! I’ll track down that internal error with our Cloud team.
👍 1
c
Thanks for the ping, @Zanie! I talked to @David Beck offline and we got it squared away, and I’ve got an exciting query plan to read! Win-win!
d
Thanks all for your help!