# How to remove old flag from the github check

**URL:** <https://community.codecov.com/t/how-to-remove-old-flag-from-the-github-check/4093>\
**Category:** Support\
**Tags:** github\
**Created:** [January 30, 2023, 8:29am UTC](https://community.codecov.com/t/how-to-remove-old-flag-from-the-github-check/4093 "2023-01-30T08:29:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kcsam](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/kcsam/32/2856_2.png) [@kcsam](https://community.codecov.com/u/kcsam)\
**Post date:** [January 30, 2023, 8:29am UTC](https://community.codecov.com/t/how-to-remove-old-flag-from-the-github-check/4093/1 "2023-01-30T08:29:48Z")

</div>

## Before submitting a topic, please confirm the following

I have searched for similar issues before creating this topic.  
 I have verified that my repository is using the [Codecov GitHub app](https://github.com/apps/codecov), if using GitHub  
 I have [validated](https://docs.codecov.com/docs/codecov-yaml#validate-your-repository-yaml) my `codecov.yaml` configuration file.  
 I have filled out the below sections to the best of my ability.

### Description

I have uploaded several report with flag.  
=\> command I use: `./codecov -t <codetoken> -f coverage/clover.xml -c -F test`  
I would like to remove the test flag from my repo so that it doesn’t appear in my github check.  
How can I do that?

### CI/CD URL

Not relevant

### Codecov Output

Not relevant

### Expected Results

Remove flag from codecov

### Actual Results

Can’t remove flag

### Additional Information

I tried to Erase repo coverage content but it is showing me `We were unable to erase this repo's content`.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [February 3, 2023, 4:57am UTC](https://community.codecov.com/t/how-to-remove-old-flag-from-the-github-check/4093/2 "2023-02-03T04:57:40Z")

</div>

@kcsam can you post your `codecov.yml`?

---

<div class="post-metadata">

**Author:** ![kcsam](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/kcsam/32/2856_2.png) [@kcsam](https://community.codecov.com/u/kcsam)\
**Post date:** [February 7, 2023, 3:14am UTC](https://community.codecov.com/t/how-to-remove-old-flag-from-the-github-check/4093/3 "2023-02-07T03:14:19Z")

</div>

@tom

Here is my codecov.yml

```auto
codecov:
  require_ci_to_pass: false # Codecov would not wait for all other statuses to pass before sending its status.
  notify:
    wait_for_ci: false # Codecov would not wait for all CI statuses to complete before sending ours.
    after_n_builds: 1 # number of reports Codecov should wait to receive before sending statuses
coverage:
  precision: 2
  round: down
  status:
    project:
      default:
        target: 70% # the required coverage value
        threshold: 1% # the leniency in hitting the target
    patch:
      default:
        target: 90%
        threshold: 1%
comment:
  layout: 'reach,diff,flags,files'
  behavior: default # update, if exists. Otherwise post new
  require_changes: false
  require_base: no
  require_head: no

flag_management:
  default_rules: # the rules that will be followed for any flag added, generally
    carryforward: false
    statuses:
      - type: project
        target: 80%
      - type: patch
        target: 90%
  individual_flags:
    - name: backend
      paths:
      - backend/**
      statuses:
        - type: project
          target: 80%
        - type: patch
          target: 90%
    - name: mobile-app
      paths:
        - mobile-app/**
      statuses:
        - type: project
          target: 60%
        - type: patch
          target: 90%
    - name: mobile-app-ts-coverage
      paths:
        - mobile-app/**
      statuses:
        - type: project
          target: 99%
        - type: patch
          target: 100%
    - name: sorbet-coverage
      paths:
        - backend/**
      statuses:
        - type: project
          target: 99%
        - type: patch
          target: 100%

```

Here is screenshot of some of my flags under codecov UI  
 ![Screenshot 2023-02-07 at 11.11.13 AM](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/2X/2/2bc63795d364075bcb229e88c44b1e3cd4fd9c86.png)

I would like to remove all the test flag eg. `test` and `test-clover` (the test flag I create from my local console) from my listed flag.  
Is it possible?  
Thanks.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [February 7, 2023, 2:23pm UTC](https://community.codecov.com/t/how-to-remove-old-flag-from-the-github-check/4093/4 "2023-02-07T14:23:30Z")

</div>

Got it, @kcsam. Unfortunately, it is not yet possible to remove an old flag from the UI. We are looking to implement this in the next few months.

---

<div class="post-metadata">

**Author:** ![kcsam](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/kcsam/32/2856_2.png) [@kcsam](https://community.codecov.com/u/kcsam)\
**Post date:** [February 8, 2023, 11:44am UTC](https://community.codecov.com/t/how-to-remove-old-flag-from-the-github-check/4093/5 "2023-02-08T11:44:30Z")

</div>

@tom  
If I choose to `Erase Content`, would it help to solve this problem?

FYI,  
When I choose to `Erase Content`, it will return me an error of `We were unable to erase this repo's content`.

If none of the above works, can I ask for support to remove all flags from my repo?

Thanks.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [February 8, 2023, 7:47pm UTC](https://community.codecov.com/t/how-to-remove-old-flag-from-the-github-check/4093/6 "2023-02-08T19:47:45Z")

</div>

@kcsam, at this time, `Erase Content` will not delete the old flags, and support will not be able to remove them. However, we are working on that functionality (`Erase Content` will also remove all flags).

The ETA for the functionality is the end of the month if you can wait until then. Also, are you an admin to the repo?

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [August 4, 2023, 11:48pm UTC](https://community.codecov.com/t/how-to-remove-old-flag-from-the-github-check/4093/7 "2023-08-04T23:48:06Z")

</div>

@kcsam you should be able to remove flags now in the Codecov UI.
