[mythtv-users] Remove an entire storage group and delete all recordings in it

George Nassas gnassas at mac.com
Fri Dec 24 16:11:07 UTC 2010

On 2010-12-24, at 9:57 AM, Brent Bolin wrote:

> Example:
> /var/lib/mythtv/recordings
> /some/other/location (want to remove this one)

Of course it's easy enough to remove the directory/storage group using mythtv-setup but the trick is to get myth to isolate the recordings in that dir so they can be deleted.

I think you have to resort to sql and the goal would be to move those recordings into their own recording group where you can delete them without disturbing your other recordings. Something like this:

cd /some/other/location
(echo "'noname.file'; ls -1 | sed "s/^/,'/" | sed "s/$/'/" > /tmp/bbye

mysql -u mythtv -pmythtv mythconverg -e "update recorded set recgroup = 'ByeBye' where filename in ($(cat /tmp/bbye))"

I'm not sure if I have the field names correct and I'm not near my myth box to check. Be sure to back up your db or at least the recorded table before doing this sort of kooky stuff.

Hopefully it's obvious how to switch recording groups and do mass deletes using playlists.

- George

More information about the mythtv-users mailing list