After someone has died, it is important to keep their medications for a period of time in case they are needed for investigation purposes. The exact length of time may vary depending on local laws and regulations, but typically medications should be kept for at least a few weeks to a few months. It is important to consult with healthcare professionals or legal authorities for specific guidance in each situation.