diff --git a/manpages/ndnpoke.rst b/manpages/ndnpoke.rst
index 83abfeb..b5c105d 100644
--- a/manpages/ndnpoke.rst
+++ b/manpages/ndnpoke.rst
@@ -4,7 +4,7 @@
 Synopsis
 --------
 
-**ndnpoke** [-h] [-u] [-F] [-x *freshness*] [-S *info*] [-w *timeout*] [-v] [-V] *name*
+**ndnpoke** [-h] [-x *freshness*] [-F] [-S *info*] [-u\|\ -w *timeout*] [-v] [-V] *name*
 
 Description
 -----------
@@ -20,15 +20,12 @@
 ``-h, --help``
   Print help and exit.
 
-``-u, --unsolicited``
-  Send the Data packet without waiting for an incoming Interest.
+``-x, --freshness <freshness>``
+  Set ``freshness`` (in milliseconds) as the ``FreshnessPeriod``.
 
 ``-F, --final``
   Set the ``FinalBlockId`` to the last component of *name*.
 
-``-x, --freshness <freshness>``
-  Set ``freshness`` (in milliseconds) as the ``FreshnessPeriod``.
-
 ``-S, --signing-info <info>``
   Specify the parameters used to sign the Data packet. If omitted, the default key of
   the default identity is used. The general syntax is ``<scheme>:<name>``. The most
@@ -41,6 +38,9 @@
     is only a hash function, not a real signature, but it can significantly speed up
     packet signing operations.
 
+``-u, --unsolicited``
+  Send the Data packet without waiting for an incoming Interest.
+
 ``-w, --timeout <timeout>``
   Quit the program after ``timeout`` milliseconds, even if no Interest has been received.
 
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);
   }
diff --git a/tools/ping/server/main.cpp b/tools/ping/server/main.cpp
index d43f1d2..e81125c 100644
--- a/tools/ping/server/main.cpp
+++ b/tools/ping/server/main.cpp
@@ -127,13 +127,8 @@
   hiddenDesc.add_options()
     ("prefix", po::value<std::string>(&prefix));
 
-  po::options_description deprecatedDesc;
-  deprecatedDesc.add_options()
-    ("_deprecated_freshness_,x", po::value<time::milliseconds::rep>())
-    ;
-
   po::options_description optDesc;
-  optDesc.add(visibleDesc).add(hiddenDesc).add(deprecatedDesc);
+  optDesc.add(visibleDesc).add(hiddenDesc);
 
   po::positional_options_description posDesc;
   posDesc.add("prefix", -1);
@@ -154,11 +149,6 @@
     return 2;
   }
 
-  if (vm.count("_deprecated_freshness_") > 0) {
-    std::cerr << "WARNING: short option '-x' is deprecated and will be removed in the near "
-                 "future. Please use '-f' or the long form '--freshness'." << std::endl;
-  }
-
   if (vm.count("help") > 0) {
     usage(std::cout, argv[0], visibleDesc);
     return 0;
@@ -177,9 +167,6 @@
   options.prefix = prefix;
 
   options.freshnessPeriod = time::milliseconds(vm["freshness"].as<time::milliseconds::rep>());
-  if (vm.count("_deprecated_freshness_") > 0) {
-    options.freshnessPeriod = time::milliseconds(vm["_deprecated_freshness_"].as<time::milliseconds::rep>());
-  }
   if (options.freshnessPeriod < 0_ms) {
     std::cerr << "ERROR: FreshnessPeriod cannot be negative" << std::endl;
     return 2;
