PHP session directory full?

sudo find /var/lib/php/session -type f -delete will work better than sudo rm /var/lib/php/session/* because expansion of * is hardly possible for big lists of files.


It sounds like your application is creating sessions but never destroying them. This could be poor programming and a mix of bad environment settings.

If you want to remove those session files you need to use sudo as they're likely not owned by your user.

sudo rm /var/lib/php/session/*

I would not remove the entire session directory.

Another thing is to adjust the PHP Session timeout to a smaller interval.