Overview
Thetenderly contracts remove command removes smart contracts from your Tenderly project. You can remove contracts by tag, by ID, or remove all contracts from a project.
Usage
Flags
Remove all contracts with the specified tag from the configured project.This is useful for:
- Cleaning up old deployment versions
- Removing test deployments
- Managing staged environments
Remove a specific contract by its unique identifier. The ID format is ID Format:
eth:{network_id}:{contract_address}.eth:{network_id}:{contract_address}eth- Protocol prefix{network_id}- Network chain ID (e.g.,1for Mainnet){contract_address}- Contract address (checksummed or lowercase)
The slug of the project from which to remove contracts. Use this when you have multiple projects configured.
Configuration
Configure yourtenderly.yaml file:
Single Project
tenderly.yaml
Multiple Projects
tenderly.yaml
When using multiple projects, specify which project to remove contracts from using the
--project-slug flag.Examples
Remove All Contracts
Remove all contracts from the configured project:Remove by Tag
Remove all contracts tagged with a specific version:Remove by Contract ID
Remove a specific contract from Ethereum Mainnet:Remove from Specific Project
When you have multiple projects, target a specific one:Combined Flags
Remove specific contracts from a specific project:Finding Contract IDs
To find contract IDs for removal:Method 1: Tenderly Dashboard
- Go to your Tenderly Dashboard
- Navigate to Contracts in your project
- Click on the contract you want to remove
- Copy the ID from the URL or contract details
Method 2: Tenderly API
You can also query contract IDs via the Tenderly API:Method 3: From Push Output
When you push contracts, note the contract addresses. The ID format is:- Contract:
0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb - Network: Ethereum Mainnet (
1) - ID:
eth:1:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb
Removal Behavior
Contract selection
The CLI identifies contracts to remove based on your flags:
- No flags: All contracts in the project
--tag: All contracts with matching tag--id: Single specific contract
Multi-Project Removal
When working with multiple projects:tenderly.yaml
What Gets Removed
When you remove a contract:- Contract source code and verification data
- Contract metadata (name, tags, etc.)
- Association with the project
- Historical blockchain data (transactions remain on-chain)
- Forked networks that include the contract
- Simulations that used the contract
Removed contracts can be re-added to the project by running
tenderly contracts push again.Troubleshooting
Project configuration not found
Project configuration not found
Cause: Invalid project slug or missing
tenderly.yaml.Solution:Contract ID not found
Contract ID not found
Cause: Invalid contract ID format or contract doesn’t exist.Solution:
- Verify ID format:
eth:{network_id}:{address} - Check network ID is correct
- Ensure contract exists in the project
- Verify address checksum
No contracts with specified tag
No contracts with specified tag
Cause: No contracts have the specified tag.Solution:
- Check available tags in Tenderly Dashboard
- Verify tag spelling (case-sensitive)
- List all contracts to see their tags
Removal failed for some projects
Removal failed for some projects
Cause: Multiple projects configured, some may have errors.Solution:
- Check error messages for specific projects
- Use
--project-slugto target one project at a time - Verify project access permissions
Use Cases
Clean Up Old Versions
Remove outdated contract versions:Remove Test Deployments
Clean up after testing:Manage Staging Environment
Remove staged contracts before production:Remove Specific Failed Deployment
Remove a single problematic contract:Best Practices
-
Use tags consistently: Tag contracts during push for easier removal later
-
Verify before removing: Check which contracts will be removed
- Review contracts in the Dashboard
- Confirm tags match expected contracts
- Document removals: Keep track of removed contracts for auditing
- Test in staging first: Remove from test projects before production
- Backup contract data: Export important data before removal
-
Use specific targeting: Prefer
--idor--tagover removing all contracts
Related Commands
tenderly contracts push- Push contracts to Tenderlytenderly contracts verify- Verify contractstenderly init- Initialize project configuration