reclean.sh - line 135: Argument list too long
reclean found no deleted documents, but returned 2142 files and directories without metadata, causing the script to crash with an argument list too long.
The few returned items I've looked for manually do not exist, moreover the script returns more "junk" than the total number of files/directories in /xochitl/
$ reclean.sh
Attempting to establish connection with the device...
Successfully established connection, please do not lock your device until the script has completed!
Search for metadata from deleted documents [y/N]: y
Note: Documents previously pushed to the cloud will be re-downloaded as soon as connection is established
Searching for deleted files...
No deleted documents found, nothing to clean here...
Search for files and directories without metadata [y/N]: y
Searching for junk...
The following documents have been found:
~/.local/share/remarkable/xochitl/0038e664-71c1-4968-b487-889052f4a6d1*
...
~/.local/share/remarkable/xochitl/ffc641b5-bce5-4bbc-926e-daa9904e267e*
~/.local/share/remarkable/xochitl/fff95313-0f3e-4897-8b61-a905aff40401*
Proceed: [y/n]: y
Deleting files...
~/bin/reclean.sh: line 135: /usr/bin/ssh: Argument list too long
Trying to delete them manually:
$ ssh remarkable "rm -R ~/.local/share/remarkable/xochitl/fff95313-0f3e-4897-8b61-a905aff40401*"
rm: can't remove '/home/root/.local/share/remarkable/xochitl/fff95313-0f3e-4897-8b61-a905aff40401*': No such file or directory
in total, the script identified 2142 junk items, but:
remarkable: ~/.local/share/remarkable/xochitl/ ls -l | wc -l
1775
remarkable: ~/.local/share/remarkable/xochitl/ ls *.metadata | wc -l
215
Thanks for reporting, it is likely that reclean is no longer compatible with the latest software version. I'll take a look at it as soon as I find the time!
A bit of unearthing here but I'm having the same issue on the metada (lots of them, can't delete)