\begin{exe} {Using dpkg}

   Here we will just do a number of simple operations for
   querying and verifying \textbf{Debian} packages.

   \begin{enumerate}
      \item
      Find out what package the file
      \filelink{/etc/logrotate.conf} belongs to.
      \item List information about the package including all the files
      it contains.
      \item Verify the package installation.
      \item Try to remove the package.
   \end{enumerate}
   \begin{sol}

      \begin{enumerate}
         \item
         \begin{cmd}
$ dpkg -S logrotate.conf
         \end{cmd}
         \begin{response}
logrotate: /usr/share/man/man5/logrotate.conf.5.gz
logrotate: /etc/logrotate.conf
rsync: /usr/share/doc/rsync/examples/logrotate.conf.rsync     
         \end{response}
         \item
         \begin{cmd}
$ dpkg -L logrotate
         \end{cmd}
         \begin{response}
...
         \end{response}
         \item
         \begin{cmd}
$ dpkg -V logrotate
         \end{cmd}
         \item
         \begin{cmd}
$ sudo dpkg -r logrotate
         \end{cmd}
         \begin{response}
dpkg: dependency problems prevent removal of logrotate:
 ubuntu-standard depends on logrotate; however:
  Package logrotate is to be removed.
 libvirt-daemon-system depends on logrotate.

dpkg: error processing package logrotate (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 logrotate
         \end{response}

      \end{enumerate}
   \end{sol}
\end{exe}

