# Disable or Skip Global Hooks

**URL:** <https://forum.buildkite.community/t/disable-or-skip-global-hooks/4016>\
**Category:** General\
**Created:** [October 31, 2024, 4:06pm UTC](https://forum.buildkite.community/t/disable-or-skip-global-hooks/4016 "2024-10-31T16:06:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![benmllr86](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@benmllr86](https://forum.buildkite.community/u/benmllr86)\
**Post date:** [October 31, 2024, 4:06pm UTC](https://forum.buildkite.community/t/disable-or-skip-global-hooks/4016/1 "2024-10-31T16:06:27Z")

</div>

Is it possible to skip global hooks like: `post-command`. ?

Even if i can override it with an empty script i would be okay with that.

---

<div class="post-metadata">

**Author:** ![stephanie.atte](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/stephanie.atte/32/1357_2.png) [@stephanie.atte](https://forum.buildkite.community/u/stephanie.atte)\
**Post date:** [October 31, 2024, 4:34pm UTC](https://forum.buildkite.community/t/disable-or-skip-global-hooks/4016/2 "2024-10-31T16:34:05Z")

</div>

Hey @benmllr86

Welcome to our community!

It seems you do not want to run the post-command hook defined in the agent hook(global hook).

You can just rename the file as seen below in the hooks folder, that way it just remains a sample

```auto
mv post-command post-command.sample

```

---

<div class="post-metadata">

**Author:** ![benmllr86](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@benmllr86](https://forum.buildkite.community/u/benmllr86)\
**Post date:** [October 31, 2024, 4:46pm UTC](https://forum.buildkite.community/t/disable-or-skip-global-hooks/4016/3 "2024-10-31T16:46:27Z")

</div>

Hello Stephanie,

thank you for your reply. How or Where do i run that? is that somehow part of the pipeline.yml ?

---

<div class="post-metadata">

**Author:** ![stephanie.atte](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/stephanie.atte/32/1357_2.png) [@stephanie.atte](https://forum.buildkite.community/u/stephanie.atte)\
**Post date:** [October 31, 2024, 5:02pm UTC](https://forum.buildkite.community/t/disable-or-skip-global-hooks/4016/4 "2024-10-31T17:02:48Z")

</div>

Hey @benmllr86,

It is not part of the pipeline.yml, that is for the pipeline configuration only. The location of the Buildkite Agent hooks folder depends on the OS and Agent installation method you used to setup the agent. Here’s a quick reference of the Agent Hook Folders:

- **Linux** : `~/.buildkite-agent/hooks`
- **macOS (Silicon)**: `/opt/homebrew/etc/buildkite-agent/hooks`
- **macOS (Intel)**: `/usr/local/etc/buildkite-agent/hooks`
- **Windows** : `C:\buildkite-agent\hooks`

Once you naivgate to the correct directory on your local machine, then you can use these commands:

```auto
ls
mv post-command post-command.sample

```

For other installer options, check the [Buildkite Agent Installation guide](https://buildkite.com/docs/agent/v3/installation). You can usually find the hook location under file locations on the installer page.

---

<div class="post-metadata">

**Author:** ![benmllr86](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@benmllr86](https://forum.buildkite.community/u/benmllr86)\
**Post date:** [November 1, 2024, 5:23am UTC](https://forum.buildkite.community/t/disable-or-skip-global-hooks/4016/5 "2024-11-01T05:23:11Z")

</div>

Ohh I see. I was mainly thinking of the agents that gets created and used during the CI run but i understand how they are all connected now.

Thank you for your help.
