Applicable to:
- Plesk for Linux
Question
How to clean temporary Plesk files on a Linux server to free up disk space?
Answer
There are two ways in Plesk to safely clean temporary Plesk files on a Linux server.
Note: Cleaning temporary Plesk files may not free up a lot of disk space. That means this solution may not help when there is no free disk space on a server.
-
Open the Plesk Repair Kit by navigating to the following URL:
Note: Replace IP address/hostname in the URL below with your IP address/hostname.
PLESK_INFO: https://server.example.com:8443/repair/
PLESK_INFO: https://203.0.113.2:8443/repair/
-
Input your Plesk Administrator credentials in the corresponding Username and Password fields and click Sign in.
-
Click the Free Up Disk Space button to clean temporary files:
-
Connect to the Plesk server via SSH.
-
Delete temporary files that are older than X days from the
/tmp
and/var/tmp/
directories. In this example, we are removing temporary files that are older than 14 days:# find /tmp -type f -mtime +14 -exec rm {} \;
# find /var/tmp -type f -mtime +14 -exec rm {} \; -
Delete temporary files created by Plesk and its services:
Note: We recommend to run these commands when there are no active Plesk Installer and Plesk backup tasks on a server.
-
Temporary Plesk backup files:
# rm -rf /usr/local/psa/PMM/tmp/*
-
Other temporary files:
# rm -rf /usr/local/psa/tmp/*
-
Comments
15 comments
https://IPADDRESS:8443/repair is 404 not found on all my servers.
This will break Media Uploader (error: "missing temporary dir") in all Wordpress sites on the server using PHP FPM (FastCGI is ok), php.ini unaltered.
@Marco Marsala,
Hi!
1) Plesk repair kit presents only on Plesk Onyx 17.8. Additionally, please check if your OS uses systemd init system (https://docs.plesk.com/en-US/onyx/administrator-guide/plesk-administration/repair-kit.79310/).
2) I can suppose that /tmp folder itself was accidentally removed. Please make sure that there is an asterisk in rm -rf /tmp/* when removing the content of /tmp
I confirm /tmp was not removed. The issue happes with FPM and Wordpress 5.x only.
@Marco Marsala, Hello there!
I was trying reproducing this issue on a test environments and different WordPress versions, however, have not reproduced. This is a really interesting case, that has a number of variables within it. Thus, we would like for this case to reach Technical Support in order to investigate it deeper. Please create a request according to this article: How to submit request to Plesk Support
Was there ever a solution for this? I desperately need to clear some space, but I don't want it to impact my Wordpress website.
Hi @Marnette,
Certain temporary files are not managed by Plesk but by the OS. For that matter, we recommend applying the solution in this article and I also recommend using the following extension https://www.plesk.com/extensions/diskspace-usage-viewer/.
As documented at the bottom of this article: https://docs.plesk.com/en-US/obsidian/advanced-administration-guide-linux/troubleshooting.68745/
DEB-based systems have a
PRODUCT_ROOT_D
of/opt/psa
not/usr/local/psa
.Therefore, shouldn't the step 3 of the instructions for Removing tmp files via a command-line interface be changed to:
Hello Maghreb Services SARL
Thank you for the notice. The article will be reviewed.
Maghreb Services SARL
The article was reviewed, for Debian/Ubuntu /usr/local/psa is a symlink to /opt/psa. So, the article is applicable for default installations.
This way not working in centos 7 there is any other way? I have just 50B files size and plesk show 178GB
Hi Yorgos,
Which way isn't working? The one from CLI or the one from Plesk Repair?
both the first one just clean up 14MB the other with ssh not working
https://prnt.sc/zm2imm my files are just 40GB and show 172GB why and how i can clean up? Thanks
Hi Yorgos,
Have in mind that this article only cleans temporary files, those usually are leftovers from backups or temp files that normally doesn't consume more than few GB of size after some time of sever usage.
After watching the screenshot you provided, what you see is the whole root of the filesystem which uses 172GB, I would suggest checking what is consuming the disk space by means of this other article: https://support.plesk.com/hc/en-us/articles/360011166353
Please sign in to leave a comment.