How to fix initramfs-tools error when updating it

Below error appears when updating the initramfs-tools:

Processing triggers for initramfs-tools (0.130ubuntu3.8) …
update-initramfs: Generating /boot/initrd.img-5.1.0-15-generic
I: The initramfs will attempt to resume from /dev/dm-1
I: (/dev/mapper/vg0-swap)
I: Set the RESUME variable to override this.

Before proceeding beyond this point, take a data backup.

This error usually occurs if the computer had dual booting and a swap file that may have been removed or changed when installing Linux. Since I use an SSD and swap files are not needed for the same, open a terminal window and enter the following commands:

$ sudo blkid <enter>
Lists out all the UUIDs of the partitions on the disk.

$ sudo lsblk <enter>
Lists out block devices and the swap location

$ sudo swapon -s <enter>
This shows which one is active. In my case this was none.

Once it lists the UUIDs, compare with the one in the /etc/fstab file.
$ sudo vi /etc/fstab <enter>

If there is no match, comment out the entry in the /etc/fstab file with a # before the line that says swap.

Save the /etc/fstab file.

$ sudo vi /etc/initramfs-tools/conf.d/resume <enter>
Add line

$ sudo update-initramfs -u -k all <enter>
The above command regenerates the files. There should be no errors this time.