# How to disable cache for okteto deploy --build?

**URL:** <https://community.okteto.com/t/how-to-disable-cache-for-okteto-deploy-build/258>\
**Category:** How Do I?\
**Created:** [September 18, 2022, 6:12pm UTC](https://community.okteto.com/t/how-to-disable-cache-for-okteto-deploy-build/258 "2022-09-18T18:12:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![momo](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@momo](https://community.okteto.com/u/momo)\
**Post date:** [September 18, 2022, 6:12pm UTC](https://community.okteto.com/t/how-to-disable-cache-for-okteto-deploy-build/258/1 "2022-09-18T18:12:39Z")

</div>

I have noticed that after adding one line to my `okteto-stack.yml`, the changes were not reflected. I see that in `okteto stack deploy --build` command, there is a `--no-cache` option. However, okteto CLI also tells me that `okteto stack` will be deprecated and will be replaced with `okteto deploy`.

Now, when I try `okteto deploy --no-cache`, I get the error `Unknown flag: --no-cache`.

Is there an option to disable cache without using `okteto stack deploy`?

This time I got around by deleting the image from the web dashboard, but it will save some time if I can avoid this.

For reference, this is the change in my file.

before:

```auto
    command: >
      bash -c "mkdir -p tmp 
      && python manage.py collectstatic --no-input
      && python manage.py migrate
      && gunicorn rises_ops.wsgi --reload -b 0.0.0.0:8000"

```

after:

```auto
    command: >
      bash -c "mkdir -p tmp 
      # added this line
      && mkdir -p static
      && python manage.py collectstatic --no-input
      && python manage.py migrate
      && gunicorn rises_ops.wsgi --reload -b 0.0.0.0:8000"

```

---

<div class="post-metadata">

**Author:** ![pchico83](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/pchico83/32/25_2.png) [@pchico83](https://community.okteto.com/u/pchico83)\
**Post date:** [September 22, 2022, 4:42am UTC](https://community.okteto.com/t/how-to-disable-cache-for-okteto-deploy-build/258/2 "2022-09-22T04:42:29Z")

</div>

Hi, you can use the `okteto build` command, it comes with the `--no-cache` flag. You can also build all images or just a few passing the image names as arguments
