It seems that what you are asking cannot be done. More information is needed.
In order to remove an error in the data, you need an additional source of information.
For example, if you mean that you have a time history of acceleration which you want to integrate to get velocity (or double integrate to get position) and by "drift" you mean that there is a bias in the acceleration data, you would need some information (one or two points) where the velocity (or position) is known (other than at the starting point) in order to identify the bias in the acceleration.
The same aplies to more sophisticated problems. For example, suppose that you have a full 6-axis IMU and you want to integrate accelerations and rates to get position, velocity, and attitude. You cannot identify any rate or acceleration bias ("drift") unless you have additional information (such as periodic GPS position/velocity measurements) that you can use to identify errors in the IMU components.