diff --git a/substrate/utils/frame/remote-externalities/src/lib.rs b/substrate/utils/frame/remote-externalities/src/lib.rs
index 2052780286c6689ccfcbcdb0182434807852bdcd..733ec7c3200ad46d20be96680ed336204e468b93 100644
--- a/substrate/utils/frame/remote-externalities/src/lib.rs
+++ b/substrate/utils/frame/remote-externalities/src/lib.rs
@@ -160,13 +160,16 @@ impl Default for SnapshotConfig {
 
 /// Builder for remote-externalities.
 pub struct Builder<B: BlockT> {
-	/// Custom key-pairs to be injected into the externalities.
-	inject: Vec<KeyPair>,
+	/// Custom key-pairs to be injected into the externalities. The *hashed* keys and values must
+	/// be given.
+	hashed_key_values: Vec<KeyPair>,
 	/// Storage entry key prefixes to be injected into the externalities. The *hashed* prefix must
 	/// be given.
 	hashed_prefixes: Vec<Vec<u8>>,
 	/// Storage entry keys to be injected into the externalities. The *hashed* key must be given.
 	hashed_keys: Vec<Vec<u8>>,
+	/// The keys that will be excluded from the final externality. The *hashed* key must be given.
+	hashed_blacklist: Vec<Vec<u8>>,
 	/// connectivity mode, online or offline.
 	mode: Mode<B>,
 }
@@ -176,10 +179,11 @@ pub struct Builder<B: BlockT> {
 impl<B: BlockT> Default for Builder<B> {
 	fn default() -> Self {
 		Self {
-			inject: Default::default(),
 			mode: Default::default(),
+			hashed_key_values: Default::default(),
 			hashed_prefixes: Default::default(),
 			hashed_keys: Default::default(),
+			hashed_blacklist: Default::default(),
 		}
 	}
 }
@@ -435,12 +439,26 @@ impl<B: BlockT> Builder<B> {
 			},
 		};
 
-		debug!(
-			target: LOG_TARGET,
-			"extending externalities with {} manually injected key-values",
-			self.inject.len()
-		);
-		base_kv.extend(self.inject.clone());
+		// inject manual key values.
+		if !self.hashed_key_values.is_empty() {
+			debug!(
+				target: LOG_TARGET,
+				"extending externalities with {} manually injected key-values",
+				self.hashed_key_values.len()
+			);
+			base_kv.extend(self.hashed_key_values.clone());
+		}
+
+		// exclude manual key values.
+		if !self.hashed_blacklist.is_empty() {
+			debug!(
+				target: LOG_TARGET,
+				"excluding externalities from {} keys",
+				self.hashed_blacklist.len()
+			);
+			base_kv.retain(|(k, _)| !self.hashed_blacklist.contains(&k.0))
+		}
+
 		Ok(base_kv)
 	}
 }
@@ -453,13 +471,12 @@ impl<B: BlockT> Builder<B> {
 	}
 
 	/// Inject a manual list of key and values to the storage.
-	pub fn inject_key_value(mut self, injections: &[KeyPair]) -> Self {
+	pub fn inject_hashed_key_value(mut self, injections: &[KeyPair]) -> Self {
 		for i in injections {
-			self.inject.push(i.clone());
+			self.hashed_key_values.push(i.clone());
 		}
 		self
 	}
-
 	/// Inject a hashed prefix. This is treated as-is, and should be pre-hashed.
 	///
 	/// This should be used to inject a "PREFIX", like a storage (double) map.
@@ -476,6 +493,13 @@ impl<B: BlockT> Builder<B> {
 		self
 	}
 
+	/// Blacklist this hashed key from the final externalities. This is treated as-is, and should be
+	/// pre-hashed.
+	pub fn blacklist_hashed_key(mut self, hashed: &[u8]) -> Self {
+		self.hashed_blacklist.push(hashed.to_vec());
+		self
+	}
+
 	/// Configure a state snapshot to be used.
 	pub fn mode(mut self, mode: Mode<B>) -> Self {
 		self.mode = mode;
@@ -541,12 +565,44 @@ mod tests {
 			.expect("Can't read state snapshot file")
 			.execute_with(|| {});
 	}
+
+	#[tokio::test]
+	async fn can_exclude_from_cache() {
+		init_logger();
+
+		// get the first key from the cache file.
+		let some_key = Builder::<Block>::new()
+			.mode(Mode::Offline(OfflineConfig {
+				state_snapshot: SnapshotConfig::new("test_data/proxy_test"),
+			}))
+			.build()
+			.await
+			.expect("Can't read state snapshot file")
+			.execute_with(|| {
+				let key =
+					sp_io::storage::next_key(&[]).expect("some key must exist in the snapshot");
+				assert!(sp_io::storage::get(&key).is_some());
+				key
+			});
+
+		Builder::<Block>::new()
+			.mode(Mode::Offline(OfflineConfig {
+				state_snapshot: SnapshotConfig::new("test_data/proxy_test"),
+			}))
+			.blacklist_hashed_key(&some_key)
+			.build()
+			.await
+			.expect("Can't read state snapshot file")
+			.execute_with(|| assert!(sp_io::storage::get(&some_key).is_none()));
+	}
 }
 
 #[cfg(all(test, feature = "remote-test"))]
 mod remote_tests {
 	use super::test_prelude::*;
 
+	const REMOTE_INACCESSIBLE: &'static str = "Can't reach the remote node. Is it running?";
+
 	#[tokio::test]
 	async fn can_build_one_pallet() {
 		init_logger();
@@ -557,7 +613,7 @@ mod remote_tests {
 			}))
 			.build()
 			.await
-			.expect("Can't reach the remote node. Is it running?")
+			.expect(REMOTE_INACCESSIBLE)
 			.execute_with(|| {});
 	}
 
@@ -575,7 +631,7 @@ mod remote_tests {
 			}))
 			.build()
 			.await
-			.expect("Can't reach the remote node. Is it running?")
+			.expect(REMOTE_INACCESSIBLE)
 			.execute_with(|| {});
 	}
 
@@ -599,7 +655,7 @@ mod remote_tests {
 			}))
 			.build()
 			.await
-			.expect("Can't reach the remote node. Is it running?")
+			.expect(REMOTE_INACCESSIBLE)
 			.execute_with(|| {
 				// Gav's polkadot account. 99% this will be in the council.
 				let gav_polkadot =
@@ -625,7 +681,7 @@ mod remote_tests {
 			}))
 			.build()
 			.await
-			.expect("Can't reach the remote node. Is it running?")
+			.expect(REMOTE_INACCESSIBLE)
 			.execute_with(|| {});
 
 		let to_delete = std::fs::read_dir(SnapshotConfig::default().path)
@@ -648,7 +704,7 @@ mod remote_tests {
 		Builder::<Block>::new()
 			.build()
 			.await
-			.expect("Can't reach the remote node. Is it running?")
+			.expect(REMOTE_INACCESSIBLE)
 			.execute_with(|| {});
 	}
 }
diff --git a/substrate/utils/frame/try-runtime/cli/src/commands/execute_block.rs b/substrate/utils/frame/try-runtime/cli/src/commands/execute_block.rs
index 19422db90119f8f428ef799d03b54177b27b4748..216c63d00525df2d17cd303e87e01de457f41c1a 100644
--- a/substrate/utils/frame/try-runtime/cli/src/commands/execute_block.rs
+++ b/substrate/utils/frame/try-runtime/cli/src/commands/execute_block.rs
@@ -143,7 +143,7 @@ where
 
 		let builder = if command.overwrite_wasm_code {
 			let (code_key, code) = extract_code(&config.chain_spec)?;
-			builder.inject_key_value(&[(code_key, code)])
+			builder.inject_hashed_key_value(&[(code_key, code)])
 		} else {
 			builder.inject_hashed_key(well_known_keys::CODE)
 		};
diff --git a/substrate/utils/frame/try-runtime/cli/src/commands/follow_chain.rs b/substrate/utils/frame/try-runtime/cli/src/commands/follow_chain.rs
index 0526f5d327fb2e5c8af747c77257cfdac25ac09f..9125db13c78f97095530730b057300725150b802 100644
--- a/substrate/utils/frame/try-runtime/cli/src/commands/follow_chain.rs
+++ b/substrate/utils/frame/try-runtime/cli/src/commands/follow_chain.rs
@@ -112,8 +112,10 @@ where
 				..Default::default()
 			}));
 
-			let new_ext =
-				builder.inject_key_value(&[(code_key.clone(), code.clone())]).build().await?;
+			let new_ext = builder
+				.inject_hashed_key_value(&[(code_key.clone(), code.clone())])
+				.build()
+				.await?;
 			log::info!(
 				target: LOG_TARGET,
 				"initialized state externalities at {:?}, storage root {:?}",
diff --git a/substrate/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs b/substrate/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs
index 6f37e4b3849fa65be4b5880f60765373e40aed93..22120ef4b5fe43c020588b95d124a766f3fdc97f 100644
--- a/substrate/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs
+++ b/substrate/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs
@@ -132,7 +132,7 @@ where
 
 		let builder = if command.overwrite_wasm_code {
 			let (code_key, code) = extract_code(&config.chain_spec)?;
-			builder.inject_key_value(&[(code_key, code)])
+			builder.inject_hashed_key_value(&[(code_key, code)])
 		} else {
 			builder.inject_hashed_key(well_known_keys::CODE)
 		};
diff --git a/substrate/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs b/substrate/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs
index 86f5548b8aafade965a4a65223bd1839097ae9df..8de3cb3a32005758be9dc60331aea86a0ab645f2 100644
--- a/substrate/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs
+++ b/substrate/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs
@@ -54,7 +54,7 @@ where
 	let ext = {
 		let builder = command.state.builder::<Block>()?;
 		let (code_key, code) = extract_code(&config.chain_spec)?;
-		builder.inject_key_value(&[(code_key, code)]).build().await?
+		builder.inject_hashed_key_value(&[(code_key, code)]).build().await?
 	};
 
 	if let Some(uri) = command.state.live_uri() {