- Code: Select all
find "/var/lib/entropy/client/packages" -atime +30 -type f -delete
This will remove files with access time older than 30 days. However, your filesystem may be mounted with "noatime" and in that case, this wouldn't work as you expect. If this is the case, you could use "-mtime" (modification time), even though it's not the same as "atime".