Mark command as obsolete

Add a warning to the definition :

\documentclass{article}

\newcommand{\foo}{%
\PackageWarning{eqexpl}{command foo is obsolete, please use bar instead}%
bar
}

\begin{document}

\foo

\end{document}

If it's just a drop-in replacement, then something like below should be good.

\documentclass{article}

\makeatletter % let's emulate a package

\newcommand{\newversion}{This is the command that should be used}

\newcommand{\oldversion}{%
  \PackageWarningNoLine{morenko}{%
     The command \noexpand\oldversion is obsolete and might get\MessageBreak
     removed in future versions of the package.\MessageBreak
     Please use \noexpand\newversion instead%
  }%
  \global\let\oldversion\newversion
  \newversion
}

\makeatother

\begin{document}

I use \oldversion.

Again I use \oldversion.

Also \newversion.

\end{document}

This way, users will get a single warning and the old command will be redefined to mean the new one.

However, a precise way to do this might depend on the nature of the command: if you use it in an expansion context, the user will get a lot of weird errors.