How to update log4j jar in logstash installed in ubuntu VM

how will I upgrade my logstash version in ubuntu to 2.15.0, currently it is 2.14.0, but due to the vulnerability issue I need to update it to 2.15.0. can anyone tell me the command to update it to the latest version

If you want to refresh to the latest versions, you could try sudo apt-get update

If you want a specific version then see this Q&A.