diff --git a/lib/transaction_prepare.c b/lib/transaction_prepare.c index e9cae5f0..6e54d49c 100644 --- a/lib/transaction_prepare.c +++ b/lib/transaction_prepare.c @@ -106,8 +106,11 @@ compute_transaction_stats(struct xbps_handle *xhp) continue; } /* installed_size from repo */ - xbps_dictionary_get_uint64(obj, "installed_size", &tsize); - instsize += tsize; + if (ttype != XBPS_TRANS_REMOVE && ttype != XBPS_TRANS_HOLD && + ttype != XBPS_TRANS_CONFIGURE) { + xbps_dictionary_get_uint64(obj, "installed_size", &tsize); + instsize += tsize; + } /* * If removing or updating a package without preserve, * get installed_size from pkgdb instead.