List all installed rpm packages and it’s size

2010-12-09 1 min read Fedora Linux

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
comments powered by Disqus