DELETING CONTENT

SAFE DELETION PRACTICES

Learn how to safely delete content files and check for broken links.

CLI DELETION

Safe removal with confirmation
Using CLI:
BASH
# Remove content (with confirmation)
./fyt content remove pricing

# Remove without confirmation
./fyt content remove pricing --force
Confirmation Prompt:
TEXT
Remove content/pages/pricing.yaml? (y/N): y
✓ Removed content/pages/pricing.yaml
⚠ Check for broken links: ./fyt validate

MANUAL DELETION

Delete files directly
Using rm Command:
BASH
# Delete file
rm content/pages/pricing.yaml

# Delete with confirmation
rm -i content/pages/pricing.yaml
Using Git:
BASH
# Remove and stage for commit
git rm content/pages/pricing.yaml

# Commit deletion
git commit -m "Remove pricing page"

DELETION CHECKLIST

Steps to follow
Before Deletion:
Backup the file
Search for references
Note all linking pages
After Deletion:
Run validation
Fix broken links
Update navigation
Test affected pages

RECOVERY

Restore deleted content
From Git:
BASH
# Restore specific file
git checkout HEAD~1 content/pages/pricing.yaml

# Or restore from specific commit
git checkout <commit-hash> content/pages/pricing.yaml
Undo Recent Deletion:
BASH
# If not committed
git restore content/pages/pricing.yaml

# If committed
git revert <commit-hash>

NEXT STEPS

Learn More: