3

I have 4.4 GB file in var/session folder. The free space is very limited so is possible to delete that folder?

4

You can clear it safely, but your customers will be loggedout and their carts will be cleared.

If you have a space issue, other than clearing your var/session path you could consider moving to database session handling.

If you like to move to DB session system:

Open app/etc/local.xml:

Change:

<session_save>file</session_save>

To:

<session_save>db</session_save>
|improve this answer|||||
5

Alternatively you could run a command like this that will delete files within the session folder older than X Days

find var/session/* -mtime +X -exec rm {} \;

Change X to the number of days. Then the most recent sessions will be safe and customers currently checking out will be fine.

Be careful with the location so you do not delete something you don't want to and take backups before doing something like this

|improve this answer|||||
  • duplicate question and answer.... – MagenX Jul 4 '16 at 11:44
  • Faster without * as the shell won't call find for each file – Erdal G. Apr 22 '17 at 20:18
2

Yes you can delete the var/session folder. Once you delete the folders from the var/session folder your all customers who are currently logged in will be loggout and you as a admin also will logout

Basically all current sessions will logout.

|improve this answer|||||
1

go to root path of the site , than you can run this command from terminal rm -rf var/session/* but if you do this , if any guest added items to cart will become empty. also you will log out from the backend. even customers have to login again in frontend.

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.