<commit_before>---
title: Managing Custom Buildpacks
owner: Buildpacks
---

<strong><%= modified_date %></strong>

This topic describes how an admin can manage additional buildpacks in Cloud Foundry using the Cloud Foundry Command Line Interface tool (cf CLI).
If your application uses a language or framework that the Cloud Foundry system buildpacks do not support, you can take one of the following actions:

* [Write your own buildpack](../buildpacks/custom.html)
* Customize an existing buildpack
* Use a [Cloud Foundry Community Buildpack](https://github.com/cloudfoundry-community/cf-docs-contrib/wiki/Buildpacks)
* Use a [Heroku Third-Party Buildpack](https://devcenter.heroku.com/articles/third-party-buildpacks)

## <a id="disabling-custom-buildpacks"></a>Add a Buildpack ##

<p class="note"><strong>Note</strong>: You must be an administrator for your Cloud Foundry org to run the commands discussed in this section.</p>

To add a buildpack, run the `cf create-buildpack BUILDPACK PATH POSITION [--enable|--disable]` command. The arguments to [cf create-buildpack](http://cli.cloudfoundry.org/en-US/cf/create-buildpack.html) specify the following:

* **BUILDPACK** specifies the buildpack name.

* **PATH** specifies the location of the buildpack.
PATH can point to a zip file, the URL of a zip file, or a local directory.

* **POSITION** specifies where to place the buildpack in the detection
priority list. For more information, see the [Buildpack Detection](../buildpacks/detection.html) topic.

* **enable** or **disable** specifies whether to allow apps to be pushed
with the buildpack.
This argument is optional, and defaults to enable.
When a buildpack is disabled, app developers cannot push apps using that buildpack.

To confirm that you have successfully added a buildpack, run `cf buildpacks`.

The following example shows the output from running the `cf buildpacks` command after an administrator adds a Python buildpack:

<pre class=terminal>
$ cf buildpacks
Getting buildpacks...

buildpack          position   enabled   locked   filename
ruby_buildpack     1          true      false    buildpack_ruby_v46-245-g2fc4ad8.zip
nodejs_buildpack   2          true      false    buildpack_nodejs_v8-177-g2b0a5cf.zip
java_buildpack     3          true      false    buildpack_java_v2.1.zip
python_buildpack   4          true      false    buildpack_python_v2.7.6.zip
</pre>

## <a id="rename"></a> Rename a Buildpack

To rename a builpack, run `cf rename-buildpack BUILDPACK_NAME NEW_BUILDPACK_NAME`. Replace `BUILDPACK_NAME` with the original buildpack name, and `NEW_BUILDPACK_NAME` with the new buildpack name.

For more information about renaming buildpack, see the [cf CLI documentation](http://cli.cloudfoundry.org/en-US/cf/rename-buildpack.html).

## <a id="update"></a> Update a Buildpack

<pre class="terminal">
$ cf update-buildpack BUILDPACK [-p PATH] [-i POSITION] [--enable|--disable] [--lock|--unlock]
</pre>

For more information about updating buildpacks, see the [cf CLI documentation](http://cli.cloudfoundry.org/en-US/cf/update-buildpack.html).

## <a id="delete"></a> Delete a Buildpack

<pre class="terminal">
$ cf delete-buildpack BUILDPACK [-f]
</pre>

For more information about deleting buildpacks, see the [cf CLI documentation](http://cli.cloudfoundry.org/en-US/cf/delete-buildpack.html).

## <a id="disabling-custom-buildpacks"></a>Disabling Custom Buildpacks ##
<%=vars.disable_custom_buildpacks%><commit_msg>Adds partial for lock/unlock buildpack to buildpacks topic [#136837671]<commit_after>---
title: Managing Custom Buildpacks
owner: Buildpacks
---

<strong><%= modified_date %></strong>

This topic describes how an admin can manage additional buildpacks in Cloud Foundry using the Cloud Foundry Command Line Interface tool (cf CLI).
If your application uses a language or framework that the Cloud Foundry system buildpacks do not support, you can take one of the following actions:

* [Write your own buildpack](../buildpacks/custom.html)
* Customize an existing buildpack
* Use a [Cloud Foundry Community Buildpack](https://github.com/cloudfoundry-community/cf-docs-contrib/wiki/Buildpacks)
* Use a [Heroku Third-Party Buildpack](https://devcenter.heroku.com/articles/third-party-buildpacks)

## <a id="disabling-custom-buildpacks"></a>Add a Buildpack ##

<p class="note"><strong>Note</strong>: You must be an administrator for your Cloud Foundry org to run the commands discussed in this section.</p>

To add a buildpack, run the `cf create-buildpack BUILDPACK PATH POSITION [--enable|--disable]` command. The arguments to [cf create-buildpack](http://cli.cloudfoundry.org/en-US/cf/create-buildpack.html) specify the following:

* **BUILDPACK** specifies the buildpack name.

* **PATH** specifies the location of the buildpack.
PATH can point to a zip file, the URL of a zip file, or a local directory.

* **POSITION** specifies where to place the buildpack in the detection
priority list. For more information, see the [Buildpack Detection](../buildpacks/detection.html) topic.

* **enable** or **disable** specifies whether to allow apps to be pushed
with the buildpack.
This argument is optional, and defaults to enable.
When a buildpack is disabled, app developers cannot push apps using that buildpack.

To confirm that you have successfully added a buildpack, run `cf buildpacks`.

The following example shows the output from running the `cf buildpacks` command after an administrator adds a Python buildpack:

<pre class=terminal>
$ cf buildpacks
Getting buildpacks...

buildpack          position   enabled   locked   filename
ruby_buildpack     1          true      false    buildpack_ruby_v46-245-g2fc4ad8.zip
nodejs_buildpack   2          true      false    buildpack_nodejs_v8-177-g2b0a5cf.zip
java_buildpack     3          true      false    buildpack_java_v2.1.zip
python_buildpack   4          true      false    buildpack_python_v2.7.6.zip
</pre>

## <a id="rename"></a> Rename a Buildpack

To rename a builpack, run `cf rename-buildpack BUILDPACK_NAME NEW_BUILDPACK_NAME`. Replace `BUILDPACK_NAME` with the original buildpack name, and `NEW_BUILDPACK_NAME` with the new buildpack name.

For more information about renaming buildpack, see the [cf CLI documentation](http://cli.cloudfoundry.org/en-US/cf/rename-buildpack.html).

## <a id="update"></a> Update a Buildpack

<pre class="terminal">
$ cf update-buildpack BUILDPACK [-p PATH] [-i POSITION] [--enable|--disable] [--lock|--unlock]
</pre>

For more information about updating buildpacks, see the [cf CLI documentation](http://cli.cloudfoundry.org/en-US/cf/update-buildpack.html).

## <a id="delete"></a> Delete a Buildpack

<pre class="terminal">
$ cf delete-buildpack BUILDPACK [-f]
</pre>

For more information about deleting buildpacks, see the [cf CLI documentation](http://cli.cloudfoundry.org/en-US/cf/delete-buildpack.html).

## <a id="lock"></a> Lock and Unlock a Buildpack

<%= partial "_lock_buildpack.html"%>

## <a id="disabling-custom-buildpacks"></a>Disabling Custom Buildpacks ##
<%=vars.disable_custom_buildpacks%>
{'fraction_non_alphanumeric': 0.10368271954674221, 'fraction_numerical': 0.008073654390934845, 'mean_word_length': 4.385964912280702, 'pattern_counts': {'":': 0, '<': 54, '<?xml version=': 0, '>': 54, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5179210', 'n_tokens_mistral': 2153, 'n_tokens_neox': 2074, 'n_words': 746}