On this page
To prepare for Cassandra upgrade
nodetool status  | 
nodetool upgradesstables  | 
This process can take a long time for large databases. Use the jobs option to use more threads for the operation (0 for maximum threads available, default is 2). Also, use the nohup command to run the upgrade process in the background. 
 Make sure this process is completed before proceeding!  | 
To upgrade Cassandra
IMPORTANT! Flush memtables to the disk by executing the following command:
nodetool drain  | 
Stop the Cassandra service.
Make a note of the existing cluster name and token count with the following command:
grep -E 'num_tokens:|cluster_name:' cassandra.yaml  | 
Uninstall/remove Cassandra (example with yum package manager)
sudo yum remove -y cassandra  | 
Cassandra configuration files are saved with .rpmsave extension after uninstallation (default path: /etc/cassandra/default.conf). Archive these files for future reference.  | 
Check the cluster name and token count in cassandra.yaml. If needed, replace the default values with the values set in the previous version. The example below shows the default values for a Cassandra installation.
cluster_name: 'Test Cluster' num_tokens: 16  | 
The cluster name and token count must match those values set in the previous version of Cassandra.  | 
Check if the service is running smoothly:
Check the log file for startup errors.
Verify that all nodes have a status of Up and Normal with this command:
nodetool status  | 
nodetool upgradesstables  | 
This process can take a long time for large databases. Use the jobs option to use more threads for the operation (0 for maximum threads available, default is 2). Also, use the nohup command to run the upgrade process in the background. 
 Make sure this process is completed before proceeding!  | 
Additional resources
For more information about upgrading Apache Cassandra, see https://www.datastax.com/learn/whats-new-for-cassandra-4/migrating-cassandra-4x.