List all installed rpm packages and it’s size

2010-12-09 156 words 1 min read

If you are looking for a command to see the disk usage by each of the rpm‘s then you can use this command:

  <td>
    <div class="text codecolorer">
      &nbsp;rpm -q --queryformat "%10{SIZE}\t%{NAME}\n"
    </div>
  </td>
</tr>
1

And if you use this command very regularly then you can create an alias like

  <td>
    <div class="text codecolorer">
      &nbsp;alias rpm_size='rpm -q --queryformat "%10{SIZE}\t%{NAME}\n" '
    </div>
  </td>
</tr>
1

and use it like

  <td>
    <div class="text codecolorer">
      rpm_size <package name>
    </div>
  </td>
</tr>
1

and if you wish to see all the packages then you can use the following:

  <td>
    <div class="text codecolorer">
      rpm -qa -–queryformat=”%10{SIZE}\t%{NAME}\n” | sort -k1,1n
    </div>
  </td>
</tr>
1

Enhanced by Zemanta

author

Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it