Command
nylas auth remove
Remove a grant from local CLI configuration.
Written by Qasim Muhammad Staff SRE
What does nylas auth remove do?
The nylas auth remove command removes a grant and its cached tokens from your local config only — it does NOT revoke the grant on the Nylas server. The grant ID is a positional argument. To revoke server-side, use nylas auth revoke <grant-id> instead.
Usage
nylas auth remove <grant-id>Flags
| Flag | Description |
|---|---|
| --json | Output as JSON |
| --no-color | Disable color output |
| --verbose(-v) | Enable verbose output |
| --config | Custom config file path |
| --help(-h) | Show help for the command |
| --limit | Limit results (most list commands) |
| --yes(-y) | Skip confirmations |
Examples
Remove a grant from local config
nylas auth remove abc-123-def-456Revoke on the server instead (permanent)
nylas auth revoke abc-123-def-456Example output
✓ Removed grant_abc123 from local config
The grant is still valid on the Nylas server.
Re-add it later with 'nylas auth add', or use
'nylas auth revoke' to permanently revoke it.Troubleshooting
Account reappears after removal
Ensure you are not running nylas auth login again from a script. Check crontab and shell profiles for auto-login commands.
Permission denied when removing
Check file permissions on ~/.config/nylas/. The CLI needs write access to delete stored credentials.
Recommended guides
List Fastmail emails from the CLI
List Fastmail emails from the CLI through Nylas IMAP access, using app passwords, inbox filters, JSON output, and Fastmail-specific auth troubleshooting.
Book meeting rooms from the CLI
Book meeting rooms from the CLI by listing calendar resources, using each room email as a calendar ID, and adding it as an event participant with less setup.
OfflineIMAP vs Nylas: Python IMAP sync
OfflineIMAP is a Python tool that syncs IMAP mail to local Maildir. Compare its config, Gmail OAuth2, sync speed, and an API email CLI that skips the mirror.
neomutt vs Nylas: IMAP reader vs email API
neomutt is a configurable IMAP terminal mail reader. Compare it to an API-backed email CLI on OAuth setup, scripting, offline access, and calendar reach.
mbsync vs Nylas: IMAP sync vs email API
mbsync (isync) syncs IMAP mailboxes to local Maildir for mutt or neomutt. Compare its sync model, Gmail OAuth setup, and where an API email CLI skips it.
Google Calendar API Sync Tokens
Use Google Calendar API sync tokens for incremental event sync, handle the 410 GONE full-resync, and read calendars from the CLI.
Run nylas auth remove --help for full help output.