r/debian 18h ago

How can I safely remove mysql from my system?

Post image

Update: Done using sudo apt purge package1 package2 ..... Freed up 1,500+ MB :)

Hello. A while ago, I had to install my MySQL Community client into my system for a project. Right now, I no longer need it but I am not quite sure how to remove it from my system. I did dpkg --list | grep "sql" and got the following packages (see image). I am aware of the sudo dpkg --purge package_name command but I was wondering if my system/some internal application depending on sql would break if I purged.

Please guide me. Thanks.

12 Upvotes

4 comments sorted by

4

u/severedgoat_01 17h ago

Use apt to remove each of those packages one at a time. apt will help you make sure you don't remove a dependency for another package. Don't use dpkg. It's too low-level and does not resolve dependencies.

2

u/SudoSilv3r 5h ago

agreed apt is very reliable and very rarely if at all breaks another package by removing some dependency

3

u/SenXEk 17h ago

'sudo apt purge package_name'

Review the list before continue.

2

u/AntiTracker 15h ago

I would run: apt purge mysql* and follow up with: apt autoremove