Jack Wallen reveals you the best way to clear the caches for each the DNF and APT bundle managers, so you may remedy bundle set up issues that come up from corrupt set up metadata.

Picture: Jack Wallen

Each DNF and APT (the bundle managers for Pink Hat and Ubuntu-based Linux distributions) retailer cached info to make sure the method of putting in software program is way sooner and dependable. With these caches in place, neither bundle supervisor has to obtain the data each time you try to replace, improve or set up software program. 

However, there are occasions when that cache info can change into outdated or corrupted. When that occurs, you may discover DNF of APT would not operate correctly. 

What do you do? You clear the cache, which is able to delete all of that info so you may have a clear slate. 

How do you clear these caches? Let me present you. 

SEE: Linux service management instructions (TechRepublic Premium)

The right way to clear the cache for the DNF bundle supervisor

One of the best ways to scrub the DNF cache is by operating the command:

sudo dnf clear dbcache 

It will take away all cache information generated from the repository metadata. 

If that does not remedy your issues, you may run an entire clear with the command: 

sudo dnf clear all

The right way to clear the cache for the APT bundle supervisor

With the APT bundle supervisor, you may challenge the command:

sudo apt-get clear

It will take away the content material from /var/cache/apt/archives (apart from the lock file). 

One other APT choice is to run: 

sudo apt-get autoclean

This solely removes the packages that can not be downloaded from repositories. In different phrases, if you happen to downloaded a .deb bundle and put in it (versus putting in it from a distant repository), any file related to that bundle will stay. 

And that is all there’s to cleansing the bundle supervisor caches for each Pink Hat and Ubuntu-based distributions. You in all probability will not have to make use of these instruments, however in case you do you now understand how.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the most recent tech recommendation for enterprise professionals from Jack Wallen.

Additionally see

Source link