Skip to content

Reducing Snipe-IT disk usage

Snipe-IT's disk usage is usually dominated by a handful of specific things, not the application itself. Work through these roughly in order of impact.

Uploads and attachments

Asset images, user avatars, license files, and PDFs/receipts attached to assets accumulate under Snipe-IT's uploads directory (storage/app/private/uploads or similar, depending on version) with no built-in expiry. This is the single biggest offender on most instances.

  • Enable image resizing/compression on upload (Snipe-IT has a "resize images" setting in Admin Settings)
  • Periodically audit for orphaned files — deleting a record does not always delete its file, so files can outlive the rows that referenced them
  • Consider moving uploads to S3-compatible object storage instead of local disk — Snipe-IT supports S3 as a filesystem driver

The action_logs table

Every change to every asset, user, and license writes a row to action_logs. On instances with frequent syncs, this can become the largest table in the database.

Purge old activity logs with the built-in Artisan command:

bash
php artisan snipeit:purge-log

Or set a retention window so it purges automatically going forward:

# .env
APP_LOG_MAX_FILES=30

Only purge if you don't need indefinite audit history — check your compliance requirements before automating this.

Application logs

storage/logs/laravel.log grows unbounded by default if log rotation isn't configured. Set the daily log driver so Laravel rotates and caps retention itself:

# .env
LOG_CHANNEL=daily

Session and cache files

If Snipe-IT is using file-based sessions/cache, files accumulate in storage/framework/sessions and storage/framework/cache. See Session cleanup without Redis for a cron-based fix, or Redis setup on Debian to move sessions/cache off the filesystem entirely.

Backups

If artisan snipeit:backup runs on a cron without pruning old archives, backups themselves fill the disk over time. Cap retention and rotate old backups off-box (e.g. to S3 or cold storage) rather than keeping every archive locally.