Is there a way to rollback to mysql 5.5, i currently have 5.6.47 installed via pkg

I tried to unistall the current version but no luck, do you guys have any idea how to basically go to any version of mysql 5.5 without reconfigurating a freebsd machine?

root@ServerfilesPoject16:~ # pkg delete mysql55-client-5.6.47
No packages matched for pattern 'mysql55-client-5.6.47'

1 Answer 1


Warning! Here be dragons!

It is unclear to me what you mean by "reconfiguring" the machine. You do not need to make any changes to the base FreeBSD installation. You do however need to make changes to the machine as those packages are conflicting.

If you take a look at Freshports you can see the conflicts:



In normal operation you will just ask to install the package you want and it will warn you of these conflicts and offer to remove them.

pkg install mysql55-client

This should then offer to remove mysql56-client.

And this leads us to what I think is a confusion on your part of version numbers.

Version 5.5 and 5.6 are different packages:

You state you have mysql55-client-5.6.47. I think it is more likely you have mysql56-client-5.6.47.

You can see what you have actually installed on your system with:

pkg info

So from an application standpoint it is very wasy to install different versions and handle conflicts. If you over time have installed many applications with dependencies that you do not need anymore you can purge them with:

pkg autoremove

Always read the man page at pkg(8). There are plenty of tutorials around on how to manage packages.

Your case with the Mysql client is simple and it is easy to swap back and forth as it is a simple client.

But if you also have the Mysql server then things might become tricky. In theory the server application is just as easy to swap around. But this is a database server and those things have... data.

So you can easily roll the application back. But the data is entirely dependent on the application. When switching version numbers in databases they often update the data structures on disk. If the data has been updated it will probably not be handled correctly by an older version. The typical roll-back would be to restore a backup. But this is determined by the application.

There are many different ways to do such backups. Especially for a database.

FreeBSD does however have one important tool to help you. If you are using the ZFS file system then you can do snapshots. If you do a snapshot before an upgrade then you can do an instant rollback by reverting to that snapshot. You can then attempt multiple upgrades (and rollbacks). It does however require you to do the snapshot before the upgrade.

The snapshot process is very quick. But to be safe you should make sure that mysql is ready to be snapshotted with FLUSH TABLES WITH READ LOCK. Do the snapshot. Then UNLOCK TABLES. See this answer and this explanation

mysql << EOF
    system zfs snapshot data/db@snapname

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .