Delete all firebase functions

自闭症网瘾萝莉.ら 提交于 2021-01-27 02:39:33

问题


I have a firebase project with multiple functions deployed. Is it possible to remove all the functions in a single go through the CLI?

I tried the command firebase functions:delete --region us-central1 and the error output was Error: Must supply at least function or group name.

As of right now, I deleted all of them specifying each of their names as such: firebase functions:delete function1 function2 ...functionN but this is very cumbersome.

The version of firebase-tools installed is v4.0.0


回答1:


Sign in to your Google Cloud Console at https://console.cloud.google.com, select your project, then from the list on the left pick Cloud Functions. When you get the list of functions, click the check box on the header line to select all, then the Delete button in the tool bar.

Update for comment:

I don't know what the product strategy for Firebase Console is with regard to Cloud Functions. My guess is that it is intended to provide a simplified, more convenient interface for managing Firebase related cloud functions. The Google Cloud Console provides a richer set of capabilities for managing functions and viewing logs. You could submit a feature request to Firebase to get those capabilities added to the Firebase console. Some details on the Firebase/Google Cloud relationship are provided at these links:

https://stackoverflow.com/a/42859932/4815718

https://cloud.google.com/functions/docs/concepts/functions-and-firebase




回答2:


Just comment (or delete) all the functions in your index.js file and redeploy it through the CLI.




回答3:


Now you can simply delete a function from the function dashboard as follows. Click on the three dots mark of relevant function in the right side corner.



来源:https://stackoverflow.com/questions/51558824/delete-all-firebase-functions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!