How to delete an incorrectly created plot with CLI?

How to delete a incorrectly created plot with CLI?I createda plot with a wrong diarection.If I use for deleting a GUI it crashes.How can I do it via CLI?

If I’m not mistaken, just close out the window that it is in. Make sure you manually delete the files on the drive that were created from the CLI.

No.I created a plot in a wrong direction.It’s being created but in nowhere.So as not to delete it with the GUI as it crashes when deleting a plot I ask how to delete it with CLI.

I think the language barrier is making this difficult. Are you trying to say “wrong directory”?

Depends on what you are trying to achieve.

  • Is the PlotJob finished: You plotted to the wrong dir and now want to move the finished plot to another dir?
  • Is the PlotJob still in progress: You started the job on the “wrong” temp drive, and you’d like to stop the job, cleanup and start a new one?

“the job on the “wrong” temp drive, and you’d like to stop the job, cleanup and start a new one?”
Yes,to cleanup

Theres no way you can do that with CLI or GUI, afaik.

  • If started via GUI, close down GUI (which will also kill all other plot jobs in progress), delete the created .TMP files on the “wrong” disk and start again.
  • If started by CLI, shut down the chia.exe you think is the wrong job (no way to tell imho with OOBE), delete the created .TMP files on the “wrong” disk and start again.

There is some tooling which lets you stop plots, but mostly only if th job was created with the tool:

  • Plotman (Linux only, Not sure if it allows you to do that)
  • SWAR (WSL or Linux, Also not sure if it allows that)
  • Ploto (Windows only with sadly some bugs atm. It can stop jobs and remove .logs and .tmp files)
1 Like

I know that I can restart my GUI or delete a plot which will result in closing GUI.I kow it thank you.But I think that there’s a way to clean it up by CLI.I do it but…J have to repeat this operation after I finish creating my 6 blocks.And it takes some 8 hours.Nevertheless thank you, man!

May be it’s possible to do via virtual environment $VENV as it’s programmed in Python?

I’ve never heard of a way to do that in CLI. But maybe we are not talking about the same things. Or I missed something.
However, heres how I handle that issue within my PowerShell Module “Ploto”:

  • When you launch a plotjob, it creates an additional log that stores the ID of the Process, argumentList and some more data of the job, along with default log from chia.exe (different file, same ID)
  • Now you can just stop the chia process with the PID we stored in the log. (Because otherwise on Windows you don’t know which plotjob is bound to which PID on which drive)
  • The script gets the ID of the plot, aswell as the TempDisk, looks for .tmp files that correspond with ID of Plot and deletes those. Does same for logs folder.

Thank you very much!

I do all my plotting in folders, like

d:\chia-plotting\

So if a plot crashes or I stop it prematurely I just delete all the files in that folder.

I think It is a good idea to keep each plotter in its own folder so you can clean things out later as needed.

1 Like

What temp files can we delete? I’m having some troubles and need to delete a few (or even all of them , I only started 2 days ago, and only ended up the sync yesterday), but the beginners guide says “Be careful that you don’t delete the temp files of another plot that’s being plotted.” Will I cause any problem to other users if I delete all temps I have? Or will I loose everything I have (wich is pretty much zero)?

Every temp file has the same plot_ID as the future plot file, so if you can identify which temp files are from the deleted process you can selectively delete those tmp files only.

I sorted my temp folder by name and then scrolled through and compared the first few characters of the filenames to the plot IDs in Swar. when I found the .tmp files that didn’t match any current process I deleted that block of files.

If you’re in the GUI, I’d recommend waiting a few hours and then using a file explorer to search for tmp files that are the oldest. They should all be the orphan .tmp files that never finished.

That’s what I’d do. YMMV

I created a small bash script for linux that actually parses the plotter’s logs.
Tt finds the temp files for each plot and deletes them if the plotter is currently not plotting to that id, i.e. the plot has failed, or if the plot has been finished and somehow there are still temp files left.

Feel free to use:

Probably not the cleanest script, but it gets the job done and even has decent user interaction ^^