You can use "rpm -qa" to list all packages. To list the total size of the files in the package, I think you will need to use the --dump option to give you the block size of each file, and then use something like awk to give you the total.
Code:
rpm -q --dump kdeutils3 | awk '{size+=$2}END{print size}'