How to clear all cache

and another question, how to clear all cache or redundant or junk in fedora? what command line most of apps i install with .rpm extension

best would be to use dnf install , which tries to resolve all dependencies. you can also use rpm -i install rpms but rpm will not try to solve dependencies automatically.

please explain what you are trying to achieveā€¦

1 Like

Hi, hereā€™s some sauce:

sudo dnf clean all

Also, read the post-upgrade section here if you really have OCD. =^)

1 Like

like in windows junk files temporary files prefetch, in linux they have same thing? if have how to remove them to optimize my desktop

thankyou for this, iā€™ll read thisā˜ŗļø

Fedora has had tmpfs for a long while. It does a much better job of not writing junk by default.

2 Likes

the temp folder resides in RAM, so when you shut down your computer, all temp files are gone. Most app caches are located in your home directory - no need to delete them.

1 Like

thankyou for clearing it up, and sorry of i have many questions. This is my first linux distro i useā˜ŗļø

This makes no sense. Downloaded rpms are automatically deleted once the install process succeeds and the repository metadata is re-downloaded on every dnf update process.

You donā€™t gain anything by running this command. I recommend using it only if dnf runs into problems.

1 Like

This is true. Itā€™s a one-line nuke command. But learning that updates take forever after doing this is just part of the natural learning process IMO.

Donā€™t be sorry, this place explicitly is for async communication.

1 Like

this fedora distro and forum is so good. I think I made a good choice for what distro Iā€™ll use :joy:

re-downloading if itā€™s duplicated it will automatically delete? for example i run that command for multiple times even though not needed

it will just update the repo metadata. donā€™t worry, your are not wasting any hard disk space by not running dnf clean all

1 Like

okay thankyouuu for both of you. Appreciated

You can also keep your metadata while safely deleting the unused rpm packages. How can you do that?

Try:

$ man dnf > /tmp/dnf.txt

Now open /tmp/dnf.txt in your favorite editor, search for ā€œCommand: cleanā€, and put some wrinkles on that grey-matter.

1 Like

copy, thankyou!!

1 Like