sudo umount /run/media/username/FlashDrive
and you get an error //umount: target is busy//, it can be very annoying to find the process that is using something from the drive.
You can use `lsof` to check which processes are accessing the files.
lsof | grep '/run/media/username/FlashDrive'
This will show you which process is using which file, which can be useful.