Comply with this text’s detailed tips to disable apt cache in Debian.
Learn how to Disable APT Cache in Debian
A simple step-by-step instruction to disable apt cache in Debian is given under:
Step 1: First, it’s essential to create a 00clean-cache-dir file on the Debian system by way of nano editor:
sudo nano /and so forth/apt/apt.conf.d/00clean-cache-dir
Step 2: Throughout the file, it’s essential to add the next line:
DPkg::Submit-Invoke ;
Step 3: Then save the clear cache file utilizing “CTRL+X”, add “Y” and enter to exit.
Step 4: Then it’s a must to create one other file with “00disbale-cache-files” identify:
sudo nano 00disable-cache-files
Step 5: Inside this file, add the next strains:
Dir::Cache::pkgcache “”;
Step 6: Save this file utilizing Step 3.
It will disable the apt cache on the Debian system.
Step 7: Now the apt cache is disabled now, it’s higher to empty the ‘/var/cache/apt/archives’ listing on Debian utilizing the next command:
sudo rm -rf /var/cache/apt/archives
Step 8 (Non-obligatory): Alternatively, it’s an excellent observe in the event you run the next command to delete the cache:
Step 9 (Non-obligatory): Additional you can too take away the cache recordsdata and directories by way of the next command:
Step 10 (Non-obligatory): Let’s clear the system by eradicating the cache file and directories utilizing the next command.
Conclusion
The apt cache on Debian might be disabled simply by making a clear cache file contained in the /and so forth/apt/apt.conf.d/ location. Then create one other file with disable cache within the residence location. Save each these recordsdata to disable the apt cache on Debian. It’s higher to take away cache recordsdata and directories by way of “rm -rf” command or some apt instructions which might be optionally available however good observe in the event you run them on the terminal.