<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-let-claude-code-optimize-my-plex-library-and-reclaimed-8tb-of-storage-fi0adxhrc" -->

---
title: I let Claude Code optimize my Plex library and reclaimed...
description: An AI coding assistant, Claude Code, was pointed at a Plex media library with read-only file access to audit and eventually clean up storage bloat, reclaiming...
canonical: https://daily.dev/posts/i-let-claude-code-optimize-my-plex-library-and-reclaimed-8tb-of-storage-fi0adxhrc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I let Claude Code optimize my Plex library and reclaimed 8TB of storage | daily.dev
og:description: An AI coding assistant, Claude Code, was pointed at a Plex media library with read-only file access to audit and eventually clean up storage bloat, reclaiming...
og:url: https://daily.dev/posts/i-let-claude-code-optimize-my-plex-library-and-reclaimed-8tb-of-storage-fi0adxhrc
og:image: https://api.daily.dev/og/posts/fi0adxHRC.png
og:image:alt: I let Claude Code optimize my Plex library and reclaimed 8TB of storage
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I let Claude Code optimize my Plex library and reclaimed 8TB of storage

**[XDA Developers](https://daily.dev/sources/xda-developers)** · 5 min read · 0 upvotes · 0 comments

## Summary

An AI coding assistant, Claude Code, was pointed at a Plex media library with read-only file access to audit and eventually clean up storage bloat, reclaiming over 8TB. The agent used command-line tools like ffprobe and hashing to find exact duplicates, redundant releases, sample videos, torrent leftovers, and oversized files, then proposed actions like transcoding large H.264 files to H.265. The workflow relied on explicit prompting to first audit before any files were moved, renamed, or deleted, and the author notes other terminal agents like Codex, Gemini CLI, Grok, and OpenCode could perform the same task.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.xda-developers.com/let-claude-code-optimize-plex-library-reclaimed-8tb-storage>

## Questions this post answers

### How can I use Claude Code to find and clean up duplicate or wasted files in my Plex media library?

Point Claude Code at your media folders with read-only access and ask it to audit for duplicates, sample videos, torrent leftovers, archives, and oversized files, using file hashes to confirm exact duplicates and ffprobe to inspect codecs, resolution, and bitrate. Have it generate a report before allowing any moves, deletes, or transcodes, then review flagged files manually since similarly named files can differ in resolution, codec, or cut.

_For anyone weighing AI agents against dedicated tools for storage cleanup, daily.dev surfaces real workflows like this one._

### Can other AI coding agents besides Claude Code be used to clean up a media library?

Yes, terminal-based AI agents such as Grok, Codex, Gemini CLI, and OpenCode can run a similar media cleanup workflow, since the approach relies on coordinating standard local command-line tools like ffprobe and ffmpeg rather than any agent-specific or Plex-specific feature. The key requirement is being able to describe the desired cleanup rules to the agent without writing the automation script yourself.

_Developers comparing AI coding agents for practical automation tasks can track these comparisons on daily.dev._

## Similar posts on daily.dev

- [I used Claude Code to improve my operating system, and here's how it made me more efficient](https://daily.dev/posts/i-used-claude-code-to-improve-my-operating-system-and-here-s-how-it-made-me-more-efficient-ztd28ecg1) · XDA Developers · 10 upvotes · 5 comments
- [I use Claude Code as a librarian, not a coder, and it's the most useful it's ever been](https://daily.dev/posts/i-use-claude-code-as-a-librarian-not-a-coder-and-it-s-the-most-useful-it-s-ever-been-8kg1brcrj) · XDA Developers · 0 upvotes · 0 comments
- [Audit your Agent files](https://daily.dev/posts/audit-your-agent-files-5pwynuy9w) · Addy Osmani · 9 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#backend](https://daily.dev/tags/backend), [#claude-code](https://daily.dev/tags/claude-code), [#self-hosting](https://daily.dev/tags/self-hosting)

[View this post on daily.dev](https://daily.dev/posts/i-let-claude-code-optimize-my-plex-library-and-reclaimed-8tb-of-storage-fi0adxhrc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I let Claude Code optimize my Plex library and reclaimed 8TB of storage","url":"https://daily.dev/posts/i-let-claude-code-optimize-my-plex-library-and-reclaimed-8tb-of-storage-fi0adxhrc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-let-claude-code-optimize-my-plex-library-and-reclaimed-8tb-of-storage-fi0adxhrc"},"datePublished":"2026-08-20T23:03:54.329Z","dateModified":"2026-09-13T18:44:41.099Z","description":"An AI coding assistant, Claude Code, was pointed at a Plex media library with read-only file access to audit and eventually clean up storage bloat, reclaiming...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/730749333e0b232bb35c1e7fe3921575?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/730749333e0b232bb35c1e7fe3921575?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"XDA Developers","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"XDA Developers","logo":"https://media.daily.dev/image/upload/s--kCg6yyAP--/f_auto,q_auto/v1774964407/logos/xda-developers?_a=BAMAMiWQ0","url":"https://daily.dev/sources/xda-developers"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-let-claude-code-optimize-my-plex-library-and-reclaimed-8tb-of-storage-fi0adxhrc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,backend,claude-code,self-hosting","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"XDA Developers","item":"https://daily.dev/sources/xda-developers"},{"@type":"ListItem","position":3,"name":"I let Claude Code optimize my Plex library and reclaimed 8TB of storage"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/i-let-claude-code-optimize-my-plex-library-and-reclaimed-8tb-of-storage-fi0adxhrc#faq","mainEntity":[{"@type":"Question","name":"How can I use Claude Code to find and clean up duplicate or wasted files in my Plex media library?","acceptedAnswer":{"@type":"Answer","text":"Point Claude Code at your media folders with read-only access and ask it to audit for duplicates, sample videos, torrent leftovers, archives, and oversized files, using file hashes to confirm exact duplicates and ffprobe to inspect codecs, resolution, and bitrate. Have it generate a report before allowing any moves, deletes, or transcodes, then review flagged files manually since similarly named files can differ in resolution, codec, or cut. For anyone weighing AI agents against dedicated tools for storage cleanup, daily.dev surfaces real workflows like this one."}},{"@type":"Question","name":"Can other AI coding agents besides Claude Code be used to clean up a media library?","acceptedAnswer":{"@type":"Answer","text":"Yes, terminal-based AI agents such as Grok, Codex, Gemini CLI, and OpenCode can run a similar media cleanup workflow, since the approach relies on coordinating standard local command-line tools like ffprobe and ffmpeg rather than any agent-specific or Plex-specific feature. The key requirement is being able to describe the desired cleanup rules to the agent without writing the automation script yourself. Developers comparing AI coding agents for practical automation tasks can track these comparisons on daily.dev."}}]}
```

