Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build.
How to reproduce it
sudo snap refresh code --classic
error: cannot refresh "code": snap "code" has running apps (code), pids: 4181,4200,4217,4233,4250,4257,4725,4736,4737,4917,4922,4923,4925,4927,4933,4934,4935,4938,4967,4972,4996,5024,6897,6919,6924,6936,6947,6959,6988
sudo apt update && sudo apt upgrade sudo snap refresh code --classic
Kill or listed pids.
# sudo kill -9 <PID> sudo kill -9 4181 sudo kill -9 4200 ... sudo kill -9 6988 sudo snap refresh code --classic