Complete News World

Autoremove cleans

Autoremove cleans

Friday, September 16, 2022, Ralph Hersel

Package managers in well-known GNU/Linux distributions do a lot and maintain the system. However, it doesn’t hurt to force a cleanup now and then. To remove orphaned packages and unused flatpacks, you can add an alias to a file .bashrc or .zshrc Type. They are in your home directory; If you don’t find it, tap once CTRL + h In the file manager to show hidden files.

Then you edit one of the above files, depending on the shell you’re using, and add an alias. An alias is a single user-defined command that is typed into the terminal and replaced by any series of commands. You are free to choose the name, instead of “automatic deletion”, you can also use “toothbrushing”:

alias autoremove="pamac remove -o; flatpak uninstall --unused"

After that you can type “autoremove” into the terminal to clean the original and flatpak packages. Of course, the first part of the command only applies to Arch-based systems (Manjaro, Endeavor, Arco, Parabola, Crystal) and does the same thing as the daemon system: sudo pacman -Rcs $(pacman -Qdtq)

If you are traveling with a Debian based distro (Ubuntu, Mint, Elementary, Zorin, POP! OS,…), the first command is: Suitable for automatic deletion. I couldn’t quickly find a command to remove quarantined packages for Fedora or openSUSE (rpm), but there must be a comment on the article posting this command.

There may also be appropriate cleanup commands for Snap packages and AppImages. If you can think of any other cleaning commands: Bring them.