PHPackages                             keyboardcowboy/drush-truncate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. keyboardcowboy/drush-truncate

ActiveDrupal-drush[Database &amp; ORM](/categories/database)

keyboardcowboy/drush-truncate
=============================

Drush command for truncating one or many tables.

1.0.0(8y ago)023GPL-2.0+PHPPHP &gt;=5.3.0

Since Jul 14Pushed 8y agoCompare

[ Source](https://github.com/KeyboardCowboy/drush-truncate)[ Packagist](https://packagist.org/packages/keyboardcowboy/drush-truncate)[ Docs](https://github.com/KeyboardCowboy/drush-truncate)[ RSS](/packages/keyboardcowboy-drush-truncate/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Drush Truncate
==============

[](#drush-truncate)

Simple drush utility to truncate database tables.

Truncate a single table:
------------------------

[](#truncate-a-single-table)

```
$ drush truncate watchdog
Found 1 tables matching watchdog on yourdb.
watchdog
Truncate 1 table on yourdb? (y/n):

```

Truncate multiple tables:
-------------------------

[](#truncate-multiple-tables)

```
# Use an asterisk as a wildcard.
$ drush truncate cache_entity_*
Found 5 tables matching cache_entity_* on yourdb.
cache_entity_comment
cache_entity_node
cache_entity_taxonomy_term
cache_entity_taxonomy_vocabulary
cache_entity_user
Truncate 5 tables on yourdb? (y/n):

```

Interactive mode lets you pick and choose.
------------------------------------------

[](#interactive-mode-lets-you-pick-and-choose)

```
$ drush truncate --interactive cache_entity_*
Found 5 tables matching cache_entity_* on yourdb.
Truncate yourdb.cache_entity_comment? (y/n): n
Skipped yourdb.cache_entity_comment.
Truncate yourdb.cache_entity_node? (y/n): y
Truncated yourdb.cache_entity_node.
Truncate yourdb.cache_entity_taxonomy_term? (y/n):

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3203d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6067f952738d7618fb6fbcf8998f07451cd09ed5a0885513e1084ae416571303?d=identicon)[KeyboardCowboy](/maintainers/KeyboardCowboy)

---

Top Contributors

[![KeyboardCowboy](https://avatars.githubusercontent.com/u/1002715?v=4)](https://github.com/KeyboardCowboy "KeyboardCowboy (2 commits)")

---

Tags

databaseDrush

### Embed Badge

![Health badge](/badges/keyboardcowboy-drush-truncate/health.svg)

```
[![Health](https://phpackages.com/badges/keyboardcowboy-drush-truncate/health.svg)](https://phpackages.com/packages/keyboardcowboy-drush-truncate)
```

###  Alternatives

[openbuildings/jam

Small but feature rich ORM, has extensible models and builders, baked in upload functionality, supporting multiple backends (rackspace, ftp), polymorphic associations, form builders, nested forms, validators

32181.3k16](/packages/openbuildings-jam)[olliejones/index-wp-mysql-for-speed

Speed up your WordPress site by adding high-performance keys (database indexes) to your MySQL database tables.

1481.8k](/packages/olliejones-index-wp-mysql-for-speed)[devgeniem/better-wp-db-error

Better WordPress database error handling.

1161.3k](/packages/devgeniem-better-wp-db-error)[pixelstudio/wp-sync-db

WordPress plugin to sync database between different installs

472.5k1](/packages/pixelstudio-wp-sync-db)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
