diff --git a/tools/peek/ndnpoke/main.cpp b/tools/peek/ndnpoke/main.cpp
index 482cf80..669ba2a 100644
--- a/tools/peek/ndnpoke/main.cpp
+++ b/tools/peek/ndnpoke/main.cpp
@@ -53,7 +53,6 @@
   std::string progName(argv[0]);
   PokeOptions options;
   std::string signingStr;
-  bool wantDigestSha256 = false;
 
   po::options_description genericOptDesc("Generic options");
   genericOptDesc.add_options()
@@ -81,15 +80,8 @@
   hiddenOptDesc.add_options()
     ("name", po::value<std::string>(), "Data name");
 
-  po::options_description deprecatedOptDesc;
-  deprecatedOptDesc.add_options()
-    ("force,f",     po::bool_switch())
-    ("identity,i",  po::value<std::string>())
-    ("digest,D",    po::bool_switch(&wantDigestSha256))
-  ;
-
   po::options_description optDesc;
-  optDesc.add(visibleOptDesc).add(hiddenOptDesc).add(deprecatedOptDesc);
+  optDesc.add(visibleOptDesc).add(hiddenOptDesc);
 
   po::positional_options_description optPos;
   optPos.add("name", -1);
@@ -104,16 +96,6 @@
     return 2;
   }
 
-  if (vm["force"].as<bool>()) {
-    std::cerr << "WARNING: option '-f/--force' is deprecated and will be removed "
-                 "in the near future. Use '-u/--unsolicited' instead." << std::endl;
-    options.wantUnsolicited = true;
-  }
-  if (wantDigestSha256 || vm.count("identity") > 0) {
-    std::cerr << "WARNING: options '-i/--identity' and '-D/--digest' are deprecated and will be "
-                 "removed in the near future. Use '-S/--signing-info' instead." << std::endl;
-  }
-
   if (vm.count("help") > 0) {
     usage(std::cout, progName, visibleOptDesc);
     return 0;
@@ -149,24 +131,6 @@
     return 2;
   }
 
-  if (vm.count("identity") > 0) {
-    if (wantDigestSha256) {
-      std::cerr << "ERROR: conflicting '--digest' and '--identity' options specified" << std::endl;
-      return 2;
-    }
-    try {
-      options.signingInfo.setSigningIdentity(vm["identity"].as<std::string>());
-    }
-    catch (const Name::Error& e) {
-      std::cerr << "ERROR: invalid identity name: " << e.what() << std::endl;
-      return 2;
-    }
-  }
-
-  if (wantDigestSha256) {
-    options.signingInfo.setSha256Signing();
-  }
-
   try {
     options.signingInfo = security::SigningInfo(signingStr);
   }
