Delete apt-get download files






















Sometime this could go in s of MB and this space could be crucial if you are running a server. If you want to clear the apt cache, there is a dedicated command to do that. Simply use the apt-get command with clean as argument:. Unlike clean, autoclean only removes the packages that are not possible to download from the repositories.

Suppose you installed package xyz. Its deb files remain in the cache. If there is now a new version of xyz package available in the repository, this existing xyz package in the cache is now outdated and useless.

The autoclean option will delete such useless packages that cannot be downloaded anymore. It is completely safe to clear the cache created by apt. When you reinstall the package, your old configurations and settings will load automatically. For example, if you installed a game using apt, apt-get remove will uninstall the game but will keep your high scores and save files intact.

But before removing a package from your system, you need to know the exact name of the package, otherwise, apt-get remove will throw an error. Search for the package you want to delete and note down its complete name. For example, let's say randompackage is the name of the package that you want to uninstall. If there are multiple packages that you want to get rid of, just type in all the package names separated with the Space character as follows:.

Keep in mind that only a root user will be able to remove packages from a Linux system. Type in the root password and press Enter. You will also get a prompt asking you to confirm your choice again. Type in Y and hit Enter to continue. Apt will now start uninstalling the specified packages.

Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?

Learn more. How to clear previously downloaded packages of apt-get? Ask Question. Asked 4 years, 8 months ago. This command deletes all the packages that your system doesn't need anymore:. Enter the root user password and then type Y to confirm the uninstallation process. If you have very little space left on your computer, you can choose to delete the downloaded archive files using the apt-get clean command.

Note that broken packages also eat up a huge chunk of your system storage. Therefore, it is important that you know how to fix broken packages on Linux. Advanced Packaging Tool or simply Apt provides all the important utilities that you need for managing packages on your system. You can install, uninstall, purge, and clean up packages using this tool.

If you are new to Linux, then knowing which distribution is the best for you is essential. Several websites are available that allow you to run and test Linux distributions right from your browser. Interested in trying Linux but don't want to install it on your computer? Try Linux in your browser instead with DistroTest.

It helps to keep your cache from growing too large. The autoremove option removes packages that were automatically installed because some other package required them but, with those other packages removed, they are no longer needed. Sometimes, an upgrade will suggest that you run this command. The packages to be removed are often called "unused dependencies".



0コメント

  • 1000 / 1000