Problem Statement
How can you safely remove a package along with unused dependencies?
Explanation
Use apt autoremove or yum autoremove depending on the system. This removes the specified package and related libraries not used by others.
It helps keep servers lean and avoids unnecessary storage usage.
Code Solution
SolutionRead Only
sudo apt remove nginx -y && sudo apt autoremove -y
Practice Sets
This question appears in the following practice sets: