Pacman removing packages without dependencies

What is the correct way or how do you do it when you want to remove a package and it wants to also remove other dependencies that will more than likely break your system at least partially.
I’m using the bellow command just because I found it first and it worked for me but I’m not sure this is the correct way to do it:

pacman -Rd --nodeps package

I always go with sudo pacman -Rns. This will remove the target package and all packages that were installed as dependencies for it and aren’t required by any other packages.


I prefer pikaur over pacman, as it saves a lot of time. The -s option is mandatory, to remove all dependencies. So, it is

pikaur -Rns

1 Like

Don’t do that:

^ This.

1 Like

Great, -Rns it is then, I don’t even know how I managed to miss that in the first place.
What does the -n do, negates if asked to remove some needed dependencies?

The -n option stands for -nosave. man pacman will return

-n --nosave
Instructs pacman to ignore file backup designations. Normally, when a file is removed from the system, the database is checked to see if the file should be renamed with a .pacsave extension.

1 Like

Thank you lots.

My pleasure @drLobes. Greetings! :slightly_smiling_face: