How do I know my actions were successful on Linux Ubuntu 22.04?

Hello folks,

I recently began to upgrade Linux packages with BigFix, i sent a shell script looking like this:


# Update package lists
sudo apt update

# Install the latest versions of the specified kernel packages
sudo apt install -y linux-image-5.15.0-1055-ibm \
linux-image-5.15.0-1055-nvidia \
linux-image-5.15.0-1055-nvidia-lowlatency \
linux-image-5.15.0-1057-intel-iotg \
linux-image-5.15.0-1059-kvm \
linux-image-5.15.0-1060-gcp \
linux-image-5.15.0-1060-oracle \
linux-image-5.15.0-1064-azure \
linux-image-5.15.0-1064-azure-fde \
linux-image-5.15.0-107-generic \

# Fix any broken dependencies
sudo apt-get install -f -y

# Clean up unnecessary packages
sudo apt autoremove -y

The big problem is that it isn’t like centOS which I can check the Yum OutPut history and check for package updates using yum and then see this through an analisys. I am completely blind, not knowing if my fixlets/tasks worked.

Also my VM Scan shows a lot of packages to upgrade associated with vulnerabilities, although I don’t see any other fixlets other than these:

And if I apply these two kernel updates it always fail, no matter what.

I am out of options here, dunno why nothing seems to work for Ubuntu on BigFix.


One thing that immediately comes to mind to me: Ubuntu has an apt history log located in /var/log/apt/history.log

You could use this as the basis of creating an Analysis to print out any packages that were installed, removed, and/or upgraded.


Hello, @eldurson.

Thank you very much for the valuable help and idea. I came up with a pretty basic relevance that now outputs the history located in the logs on /var/log/apt/history.log this solved my problem, and I am now able to identify and output the results of my actions on Ubuntu machines.

I’ll share here so more people can be helped when looking about this subject.

if (exists file "/var/log/apt/history.log") then (lines of file "/var/log/apt/history.log") else ("No history log found")

Appreciate the help.


Glad to hear that this was helpful! You are very welcome!