[Tex/LaTex] ModernCV Remove horizontal line in sections

moderncv

I want to write my cv with moderncv-Classic style. Can you tell me, how I can remove the horizontal line in the left of each section?

Best Answer

Here you go:

\RenewDocumentCommand{\section}{sm}{%
  \strut\sectionstyle{#2\hfill}%
  \par\nobreak\addvspace{1ex}\@afterheading
  }

The above code is the core of what is required. Now time for an MWE:
The MWE

\documentclass[12pt,letterpaper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage{libertine}
\usepackage[left=1cm,right=1cm,top=1cm,bottom=1cm]{geometry}
\usepackage{kantlipsum}

\makeatletter
\RenewDocumentCommand{\section}{sm}{%
  \strut\sectionstyle{#2\hfill}%
  \par\nobreak\addvspace{1ex}\@afterheading
  }

\RenewDocumentCommand{\subsection}{sm}{
  \strut\subsectionstyle{#2}{\color{color1}{\subsectionfill}}%
  \par\nobreak\addvspace{0.5ex}\@afterheading}
%
\makeatother

\name{SUBHAM}{SONI}
\address{ABC}{XYZ}{PQR}
\phone[mobile]{1234567}

\begin{document}
\makecvtitle
\section{CAREER OBJECTIVE}
\kant[1]
\end{document} 

enter image description here