Remove a GitHub Action from tracking and delete generated files.
dotgithub remove <orgRepoRef> [options]
dotgithub rm <orgRepoRef> [options]The remove command removes a GitHub Action from your project's tracking and optionally deletes the generated TypeScript files. This is useful for cleaning up unused actions or removing actions that are no longer needed.
<orgRepoRef>- GitHub repository reference (e.g.,actions/checkout@v4oractions/checkout)
--keep-files- Remove from tracking but keep generated files
dotgithub remove actions/checkout@v4This removes the action from tracking and deletes all generated files.
dotgithub remove actions/checkout@v4 --keep-filesThis removes the action from tracking but keeps the generated TypeScript files.
dotgithub rm actions/setup-node@v4The rm alias works the same as remove.
- Removes from configuration - Deletes the action entry from
dotgithub.json - Deletes generated files - Removes TypeScript files (unless
--keep-filesis used) - Updates index files - Regenerates organization and root index files
- Confirms removal - Shows success message with details
When removing an action (without --keep-files), the command deletes:
- The main action TypeScript file
- Related type definition files
- Updates organization index files
- Updates root index files
Use --keep-files when you want to:
- Remove tracking but keep the generated code
- Manually manage the TypeScript files
- Preserve custom modifications to generated files
- Temporarily disable an action
The command matches actions by:
- Repository name (org/repo)
- Version reference (if specified)
- Action path (for composite actions)
Examples of valid references:
actions/checkout- Matches any version of checkoutactions/checkout@v4- Matches specific versionactions/cache/restore- Matches specific action path
The command will fail if:
- No matching action is found
- The action reference format is invalid
- File deletion fails due to permissions
- Configuration file cannot be updated
When successful, the command shows:
✅ Removed checkout from tracking
Deleted generated files: actions/actions/checkout.ts, actions/actions/index.ts
Use this command to:
- Clean up unused actions - Remove actions no longer needed
- Reduce bundle size - Remove unnecessary dependencies
- Update dependencies - Remove old versions before adding new ones
- Project maintenance - Keep your action list current
- Migration - Remove deprecated actions during upgrades
- Use dry run first - Check what will be removed with
dotgithub list - Keep files when uncertain - Use
--keep-filesif you might need the code later - Update imports - Remove imports of deleted actions from your code
- Test after removal - Ensure your workflows still work
- Commit changes - Version control the updated configuration
- dotgithub list - See what actions are tracked
- dotgithub add - Add actions back if needed
- dotgithub update - Update instead of remove
- dotgithub regenerate - Regenerate remaining actions
- dotgithub add - Add GitHub Actions to your project
- dotgithub list - List tracked actions
- dotgithub update - Update action versions
- Configuration Guide - Understanding dotgithub.json