Skip to content

Instantly share code, notes, and snippets.

@aleksbelic
Last active August 11, 2023 14:31
Show Gist options
  • Save aleksbelic/89f69c3ab5812201fda6fc73213926b2 to your computer and use it in GitHub Desktop.
Save aleksbelic/89f69c3ab5812201fda6fc73213926b2 to your computer and use it in GitHub Desktop.
Yum list installed to CSV
yum list installed | awk '{print $1";"$2";"$3}' > /home/list_installed.csv
yum list available | awk '{print $1";"$2";"$3}' > /home/list_available.csv
yum check-update | awk '{print $1";"$2";"$3}' > /home/check_update.csv
@mick-t
Copy link

mick-t commented Aug 11, 2023

Hi,

On at least one of my systems the output for yum list installed was incorrect, it had bogus line breaks. This is what worked for me:

yum list installed | grep -v Loaded|grep -v Installed |xargs -n3 | column -t | awk '{print $1","$2","$3}'

That solution via this stackexchange answer:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment