diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 83d1fa79646b0909681185a813d72d9118bd9258..8602edd3b1c3813ab4cf5fc2c4c6683134b7c498 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -219,7 +219,7 @@ parts:
 
       # some fixes so solr can startup in containment (use ss instead of lsof and don't use large pages)
       sed -i 's/lsof -t -PniTCP:\$SOLR_PORT -sTCP:LISTEN/ss -ln | grep $SOLR_PORT/g'  $AUTOPSY_LOCATION/autopsy/solr/bin/autopsy-solr
-      sed -i 's/lsof -v 2>&1 | grep -q revision/ss --version/g' /home/autopsy/autopsy_snap/squashfs-root/autopsy/autopsy/solr/bin/autopsy-solr
+      sed -i 's/lsof -v 2>&1 | grep -q revision/ss --version/g' $AUTOPSY_LOCATION/autopsy/solr/bin/autopsy-solr
       sed -i '/^.*'-XX:\+UseLargePages'.*$/d'  $AUTOPSY_LOCATION/autopsy/solr/bin/autopsy-solr
 
       # wrapper to setup temp dir if not exists; also could be easily modified for debugging purposes with snap try: https://snapcraft.io/docs/snap-try