\documentclass{article}
\usepackage{titletoc}
\usepackage{lipsum}
\title{Creating Partial Table of Contents using titletoc}
\author{LianTze Lim}
\date{}
\begin{document}
\maketitle
% The complete ToC
\tableofcontents
\clearpage
% ToC of the main sections
\startcontents[mainsections]
\printcontents[mainsections]{l}{1}{\section*{Main Sections}\setcounter{tocdepth}{2}}
\section{A section}
\lipsum
\section{Another section}
\lipsum
\stopcontents[mainsections]
\clearpage
\appendix
% ToC of the appendices
\startcontents[appendices]
\printcontents[appendices]{l}{1}{\section*{Appendices}\setcounter{tocdepth}{2}}
\section{An appendix}
\lipsum
\section{Another appendix}
\lipsum
\end{document}