Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cleaner Laravel Package

lamoda/cleaner

Lamoda Cleaner is a PHP library for purging old data from various storages, primarily databases. Includes configurable DB cleaners such as a Doctrine DBAL cleaner that runs parameterized cleanup queries to delete outdated records.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Data Retention & Compliance: Enables automated cleanup of stale data (e.g., logs, cache, user sessions) to meet GDPR, CCPA, or internal retention policies, reducing legal/operational risk.
  • Cost Optimization: Reduces storage costs (e.g., S3, databases) by purging obsolete files, backups, or temporary data without manual intervention.
  • Performance Improvements: Frees up database/index space or file storage, indirectly boosting query speeds or reducing I/O bottlenecks.
  • Build vs. Buy: Avoids reinventing a generic cleanup system, saving dev time for higher-value features. Justification for adopting an open-source solution over a SaaS tool (e.g., if cleanup logic is simple and internal).
  • Roadmap Prioritization: Supports initiatives like:
    • Migrating to cheaper storage tiers (e.g., S3 Infrequent Access).
    • Automating post-deployment cleanup (e.g., after feature rollouts).
    • Integrating with CI/CD pipelines for zero-downtime maintenance.

When to Consider This Package

  • Adopt if:

    • Your app stores time-bound data (e.g., audit logs >90 days, temporary uploads, expired sessions) and lacks a built-in cleanup mechanism.
    • You’re using Laravel/Eloquent and need database + filesystem cleanup (e.g., deleting old model records and associated files).
    • Your team prioritizes low-maintenance solutions over custom scripts (e.g., cron jobs with raw SQL).
    • You’re archiving or migrating data and need a one-time bulk cleanup tool.
  • Look elsewhere if:

    • Your cleanup logic requires complex business rules (e.g., "delete only if user X hasn’t logged in for 6 months and hasn’t purchased in 1 year").
    • You need real-time cleanup (e.g., soft deletes with immediate storage sync) or event-driven triggers (e.g., Slack notifications before deletion).
    • Your stack isn’t Laravel/PHP (e.g., Django, Node.js, or serverless architectures).
    • You require audit trails or recovery options (this package is destructive by design).
    • The package’s last release is 2+ years old (risk of compatibility issues with Laravel 10+).

How to Pitch It (Stakeholders)

For Executives: "This open-source tool automates the cleanup of stale data—like old logs, cache, or user uploads—to cut storage costs and reduce compliance risks. For example, if we’re paying $500/month for S3 storage, purging 10GB of obsolete files could save ~$15/month with zero dev effort. It’s a low-risk way to optimize infrastructure without hiring engineers to build custom scripts. Since it’s MIT-licensed and Laravel-native, it integrates seamlessly with our stack."

For Engineering: *"lamoda/cleaner is a lightweight Laravel package that handles bulk deletion of expired data across databases and filesystems. It’s ideal for:

  • Scheduled cleanup: Run via cron to purge logs/cache older than X days.
  • Post-migration cleanup: Wipe test data or old backups after deployments.
  • Prototyping: Quickly test cleanup logic before building a custom solution. Tradeoffs: It’s not event-driven (no hooks for pre/post-deletion) and lacks audit logging. If we need those, we’d need to extend it. But for basic TTL-based cleanup, it’s a 10-minute setup vs. weeks of dev work."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
aimeos/prisma
besmartand-pro/php-quality-config
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views