# How do you Revoke an Access Grant using Uplink CLI with Examples

**URL:** <https://forum.storj.io/t/how-do-you-revoke-an-access-grant-using-uplink-cli-with-examples/16320>\
**Category:** FAQ\
**Tags:** access-grants\
**Created:** [December 2, 2021, 5:08am UTC](https://forum.storj.io/t/how-do-you-revoke-an-access-grant-using-uplink-cli-with-examples/16320 "2021-12-02T05:08:22Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [December 2, 2021, 7:07pm UTC](https://forum.storj.io/t/how-do-you-revoke-an-access-grant-using-uplink-cli-with-examples/16320/4 "2021-12-02T19:07:12Z")

</div>

> [@stouser1](#):
>
> Are you saying then you cannot remove the root access grant using the uplink revoke command?

Yes. You can revoke only derived access grants from the CLI. The root API key or access grant can be only removed and this should be done in the satellite UI. This will immediately invalidate all derived access grants.

> [@stouser1](#):
>
> How do I delete ALL access grants from the satellite UI and config.yaml at the same time by using the uplink cli? Is this possible?

No, it’s not possible and not considered as far as I know. But you can request this feature in the [DCS feature requests - voting - Storj Community Forum (official)](https://forum.storj.io/c/ideas-and-suggestions/dcs-feature-requests/36) or [Issues · storj/storj · GitHub](https://github.com/storj/storj/issues)

> [@stouser1](#):
>
> Also, why am I getting the error message when I attempt to revoke access?

Because you are trying to revoke a root access grant. As I said - it’s not possible via CLI.  
You need to have a derived access grant to revoke it.  
For example

```auto
$ uplink share --readonly=false
...
Sharing access to satellite 12tRQrMTWUWwzwGh18i7Fqs67kmdhH9t6aToeiwbo5mfS2rUmo@us2.storj.io:7777
=========== ACCESS RESTRICTIONS ==========================================================
Download : Allowed
Upload : Allowed
Lists : Allowed
Deletes : Allowed
NotBefore : No restriction
NotAfter : No restriction
Paths : WARNING! The entire project is shared!
=========== SERIALIZED ACCESS WITH THE ABOVE RESTRICTIONS TO SHARE WITH OTHERS ===========
Access : 1Sfrjgorjgmorgiorg...

```

**NEVER DO THIS ^^^^** , this is only for test purpose!  
You will get an access grant with full permissions, then you can revoke it by

```auto
$ uplink revoke 1Sfrjgorjgmorgiorg...
=========== SUCCESSFULLY REVOKED =========================================================
NOTE: It may take the satellite several minutes to process the revocation request,
      depending on its caching policies.

```

No one command with the revoked access grant will work:

```auto
$ uplink --access 1Sfrjgorjgmorgiorg... ls
Error: uplink: uplink: permission denied (bucket: metaclient: Unauthorized API credentials)

```

> [@stouser1](#):
>
> For example; `uplink revoke access_here [flags]` , what does `access_here` refer to?

It’s a placeholder for a serialized access grant, the `1Sfrjgorjgmorgiorg...` in my example.  
The revoke of the named access grant is not possible, I created a bug a while ago, it should be solved in [[Tech Preview] Uplinkng (new enhanced uplink cli)](https://forum.storj.io/t/tech-preview-uplinkng-new-enhanced-uplink-cli/15876) and then merged to the `uplink`, when it matures.  
But you can revoke the named access grant if you provide not the name but the access grant itself (you can take it from the config file, see `uplink setup --help` for tooltip `--config-dir`)

---

_[View the full topic](https://forum.storj.io/t/how-do-you-revoke-an-access-grant-using-uplink-cli-with-examples/16320)._
