Piped app fails to update after `rm` error

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.17
What app is this about: Piped

Describe your issue

I’m trying to update Piped from version 2025.06.15~ynh1 to 2025.06.22~ynh1, but the package update script fails while attempting to clear old Gradle files.

Similar to this thread, except running sudo yunohost tools basic-space-cleanup and deleting old backups to make more storage space, didn’t help.

Share relevant logs or error messages

WARNING - rm: cannot remove '/var/www/piped/.gradle/caches/modules-2': Directory not empty
ERROR - Could not upgrade piped: An error occurred inside the app upgrade script

Full log here:
https://paste.yunohost.org/raw/uhizewuhob

Try this :

sudo apt autoclean -y && sudo apt autoremove -y

sync; echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a

sudo yunohost tools basic-space-cleanup

And reboot system ?

Then,

yunohost app upgrade piped

Otherwise
upgrade an existing install:
sudo yunohost app upgrade piped -u https://github.com/YunoHost-Apps/piped_ynh/tree/testing

1 Like

same output here when i quick checked the previous log, but not the same context, i’m not low on storage.

here’s my log
https://paste.yunohost.org/raw/susuzohumu

this log is mouthful for just this at the very end:

2025-06-25 14:07:55,314: WARNING - rm: cannot remove '/var/www/piped/.gradle/caches/modules-2': Directory not empty
2025-06-25 14:07:55,920: ERROR - Could not upgrade piped: An error occurred inside the app upgrade script

Have you made a backup of Piped before update?

Personally, I will try to delete manually with the sudo command if you are not in root:
`sudo rm -rfv /var/www/piped/.gradle/caches/modules -2 ’

If during the update the script cannot delete `/var/www/piped/.gradle/caches/modules-2 ', why not do it manually?

« I specify that personally, I will use this method »

I do not think this is a risk since in the event of concern, you can do a restoration with the backup.

And update then:
Yunohost app upgrade Piped

1 Like

Manually deleting the folder helped. Now I get a new error :sweat_smile:

userdel: user piped is currently used by process 131046
deluser: `/usr/sbin/userdel piped' returned error code 8. Exiting.
Warning: Failed to deprovision system_user : Failed to delete system user for piped
Info: Deprovisioning sources...
Error: Failed to delete system user for piped

https://paste.yunohost.org/raw/ewuxocipor

Manually deleting the piped user and stopping the Piped services before retrying the update, eventually brings me back around to the original error…

sudo rm -rf /var/www/piped/.gradle/
sudo yunohost service stop piped-api piped-proxy
sudo userdel piped
sudo yunohost app upgrade piped

Warning: rm: cannot remove ‘/var/www/piped/.gradle/caches/modules-2’: Directory not empty
Error: Could not upgrade piped: An error occurred inside the app upgrade script

https://paste.yunohost.org/raw/pagijokogu

…Oh, lol, your first suggestion seems to have been the solution.

I don’t know why it would have made any difference – apt cleanup and yunohost tools basic-space-cleanup didn’t actually remove much, and I’d tried rebooting before already. But the update finally worked this time.

:woman_shrugging: Thanks! :smile:

2 Likes

I’m glad your problem is solved :wink:

Do not forget to put [RESOLVED] just before: Piped app fails to update after rm error

1 Like