Delete old packages from local repository [duplicate]

Have you tried apt-get clean and apt-get autoclean?

apt-get clean removes everything except lock files from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. Thus, if you need to reinstall a package APT should retrieve it again.

apt-get autoclean removes only package files that can no longer be downloaded.


For removing the obsolete packages, try

sudo apt-get autoremove