I found this TODO while browsing pacman's source code, tried fixing it by checking returned errors while deleting packages files and logging accordingly. This is my first time editing code and submitting a patch; SORRY if I did anything dumb! Signed-off-by: Hamza Mogni <hamzamogni5@gmail.com> --- lib/libalpm/remove.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 9030bfee..4a19c718 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -707,7 +707,12 @@ int _alpm_remove_single_package(alpm_handle_t *handle, if(!(handle->trans->flags & ALPM_TRANS_FLAG_DBONLY)) { /* TODO check returned errors if any */ - remove_package_files(handle, oldpkg, newpkg, targ_count, pkg_count); + int err = remove_package_files(handle, oldpkg, newpkg, targ_count, pkg_count); + if (err == -1) { + _alpm_log(handle, ALPM_LOG_ERROR, "alpm lacks permission to delete all files"); + } else if (err > 0) { + _alpm_log(handle, ALPM_LOG_ERROR, "failed to delete %d files", err); + } } if(!newpkg) { -- 2.25.0